Uninitialized Constant Wx

Ron Shadow
Fri, 29 Oct 2010 12:06:03 -0000

Hello again. Another problem...

I installed RVM, and then installed Ruby 1.9.1. After that I used RVM to
make 1.9.1 the default Ruby version, and then I created a new gemset,
and then I told RVM to use that new gemset for Ruby 1.9.1. Then I did
"rvm gem install wxruby-ruby19".

After this, I ran my client script once to test it and it worked just as
well as it was working for 1.8. I concluded it worked and went on with
more coding. A few hours later when I was going to test the new code, I
started getting "Uninitialized Constant Wx" exceptions. So it appears
as
though the client succeeded in loading Wx one time, and that the client
failed to load Wx every time afterward.

I tried setting the default version of Ruby to 1.9.1 again, guessing
that maybe it got reset to 1.8, but that didn''t help.

Then I remembered that I ran the WxRuby19 Sample "wxClient.rb" in a
terminal after the first test of my client but before the next test of
my client. Could it be that running the sample script somehow dislodged
my client script from finding the Wx library?

I just checked by placing a puts statement immediately after the
''require ''wx'''' and ''include
Wx'' statements and then commented out
''include Wx''. The puts wasn''t shown in terminal.
Looks like it is the
''require ''wx'''' statement that is throwing
the exception.

I''m also still getting that segfault crash with the boxsizers but I can
only deal with one bug at a time XD

--
Posted via http://www.ruby-forum.com/.