From: Dominik Honnef Date: 2008-03-06T03:09:35+09:00 Subject: Re: wxRuby 1.9.4 On [Thu, 06.03.2008 01:09], newbie wrote: > Alex, > > I was trying to follow the instruction on wxruby page to install it > and play with the sample programs. But still couldn't get it right. > Can you please shed some light? > > -------------------------------------------------------- > First, I installed wxruby gem by "gem install wxruby" > > The message was as follows. > > Updating metadata for 11 gems from http://gems.rubyforge.org > ........... > complete > Successfully installed wxruby-1.9.4-x86-mswin32 > 1 gem installed > > -------------------------------------------------------- > > Second, I was trying to run the sample "minimal.rb" program in "C:\ruby > \lib\ruby\gems\1.8\gems\wxruby-1.9.4-x86-mswin32\samples\minimal" by > the following command. > > ruby C:\ruby\lib\ruby\gems\1.8\gems\wxruby-1.9.4-x86-mswin32\samples > \minimal\minimal.rb > > The error message was: > > C:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.4-x86-mswin32/samples/ > minimal/minimal.rb:10:in `load': > no such file to load -- wx (LoadError) > from C:/ruby/lib/ruby/gems/1.8/gems/wxruby-1.9.4-x86-mswin32/ > samples/minimal/minimal.rb:10 > > --------------------------------------------------------- > The web site says I should have "require 'rubygems'". I added it as > the first line in the program. But it still didn't work and showed the > following error message. > > minimal.rb:11:in `load': no such file to load -- wx (LoadError) > from minimal.rb:11 > > Please kindly let me know what was wrong... Thanks very much! > > My environment: > > * Windows XP > * Ruby 1.8.6 > * Gem 0.9.5 > * Wxruby: 1.9.4. > > --------------------------------------------------------- Replace the line "load 'wx'" with "require 'wx'" and it should work. Its somewhere at the top. -- Dominik Honnef