Problem loading wxruby

Discussion in 'Ruby' started by Victor Reyes, Apr 3, 2008.

  1. Victor Reyes

    Victor Reyes Guest

    [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
     
    Victor Reyes, Apr 3, 2008
    #1
    1. Advertising

  2. Victor Reyes

    Luis Lavena Guest

    On Apr 3, 3:04 pm, Victor Reyes <> 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
     
    Luis Lavena, Apr 3, 2008
    #2
    1. Advertising

  3. Victor Reyes

    Victor Reyes Guest

    [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 <> wrote:

    > On Apr 3, 3:04 pm, Victor Reyes <> 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
    >
    >
     
    Victor Reyes, Apr 3, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Schwarz
    Replies:
    5
    Views:
    108
  2. RaW

    wxRuby problem on Ubuntu

    RaW, Sep 29, 2005, in forum: Ruby
    Replies:
    7
    Views:
    158
    Daniel Lewis
    Sep 30, 2005
  3. kazaam
    Replies:
    2
    Views:
    132
    Stefano Crocco
    Aug 23, 2007
  4. Marvin Gülker
    Replies:
    0
    Views:
    136
    Marvin Gülker
    Apr 3, 2009
  5. Rainer

    wxruby problem

    Rainer, Jul 29, 2009, in forum: Ruby
    Replies:
    7
    Views:
    151
    Rainer
    Jul 30, 2009
Loading...

Share This Page