Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Problem loading wxruby

Reply
Thread Tools

Problem loading wxruby

 
 
Victor Reyes
Guest
Posts: n/a
 
      04-03-2008
[Note: parts of this message were removed to make it a legal post.]

Team,

I installed wxruby via gem install.
I successfully installed it but I can load it via require.

C:\$user\ruby\Programs\GUI and Graphs>*ruby -v
*ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

C:\$user\ruby\Programs\GUI and Graphs>gem install wxruby
Select which gem to install for your platform (i386-mswin32)
1. wxruby 1.9.5 (universal-darwin-9)
2. wxruby 1.9.5 (i386-mswin32)
3. wxruby 1.9.5 (x86-linux)
4. wxruby 1.9.5 (x86_64-linux)
5. Skip this gem
6. Cancel installation
> 2

Successfully installed wxruby-1.9.5-i386-mswin32

C:\$user\ruby\Programs\GUI and Graphs>*ruby rdg02.rb
*rdg02.rb:1:in `require': no such file to load -- wx (LoadError)
from rdg02.rb:1

Any help is appreciated!

Victor

 
Reply With Quote
 
 
 
 
Luis Lavena
Guest
Posts: n/a
 
      04-03-2008
On Apr 3, 3:04 pm, Victor Reyes <(E-Mail Removed)> wrote:
> [Note: parts of this message were removed to make it a legal post.]
>
> Team,
>
> I installed wxruby via gem install.
> I successfully installed it but I can load it via require.
>
> C:\$user\ruby\Programs\GUI and Graphs>*ruby -v
> *ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
>
> C:\$user\ruby\Programs\GUI and Graphs>gem install wxruby
> Select which gem to install for your platform (i386-mswin32)
> 1. wxruby 1.9.5 (universal-darwin-9)
> 2. wxruby 1.9.5 (i386-mswin32)
> 3. wxruby 1.9.5 (x86-linux)
> 4. wxruby 1.9.5 (x86_64-linux)
> 5. Skip this gem
> 6. Cancel installation> 2
>
> Successfully installed wxruby-1.9.5-i386-mswin32
>
> C:\$user\ruby\Programs\GUI and Graphs>*ruby rdg02.rb
> *rdg02.rb:1:in `require': no such file to load -- wx (LoadError)
> from rdg02.rb:1
>
> Any help is appreciated!
>


Did you tried require 'rubygems' first?

Since you installed via Gems, most likely you don't have RUBYOPT set
to rubygems, which automatically loaded rubygems for you.

try this:

require 'rubygems'
require 'wx'

on top of your script. That should fix what you're getting.

HTH,
--
Luis Lavena
 
Reply With Quote
 
 
 
 
Victor Reyes
Guest
Posts: n/a
 
      04-03-2008
[Note: parts of this message were removed to make it a legal post.]

I had it in reverse order.

Thank you

Victor

On Thu, Apr 3, 2008 at 3:10 PM, Luis Lavena <(E-Mail Removed)> wrote:

> On Apr 3, 3:04 pm, Victor Reyes <(E-Mail Removed)> wrote:
> > [Note: parts of this message were removed to make it a legal post.]
> >
> > Team,
> >
> > I installed wxruby via gem install.
> > I successfully installed it but I can load it via require.
> >
> > C:\$user\ruby\Programs\GUI and Graphs>*ruby -v
> > *ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
> >
> > C:\$user\ruby\Programs\GUI and Graphs>gem install wxruby
> > Select which gem to install for your platform (i386-mswin32)
> > 1. wxruby 1.9.5 (universal-darwin-9)
> > 2. wxruby 1.9.5 (i386-mswin32)
> > 3. wxruby 1.9.5 (x86-linux)
> > 4. wxruby 1.9.5 (x86_64-linux)
> > 5. Skip this gem
> > 6. Cancel installation> 2
> >
> > Successfully installed wxruby-1.9.5-i386-mswin32
> >
> > C:\$user\ruby\Programs\GUI and Graphs>*ruby rdg02.rb
> > *rdg02.rb:1:in `require': no such file to load -- wx (LoadError)
> > from rdg02.rb:1
> >
> > Any help is appreciated!
> >

>
> Did you tried require 'rubygems' first?
>
> Since you installed via Gems, most likely you don't have RUBYOPT set
> to rubygems, which automatically loaded rubygems for you.
>
> try this:
>
> require 'rubygems'
> require 'wx'
>
> on top of your script. That should fix what you're getting.
>
> HTH,
> --
> Luis Lavena
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wxruby problem Rainer Ruby 7 07-30-2009 03:11 PM
Compiling problem with WxRuby on mswin-32, Ruby 1.9.1 Marvin G├╝lker Ruby 0 04-03-2009 01:11 PM
wxruby and trayicon error and where to learn more about wxruby? kazaam Ruby 2 08-23-2007 10:20 AM
wxRuby problem on Ubuntu RaW Ruby 7 09-30-2005 10:23 AM
Problem building wxRuby: htmlproc.h not found Andreas Schwarz Ruby 5 12-13-2004 03:46 AM



Advertisments