I have wxruby gem installed. This is confirmed by gem list command.
But when I run the sample code below I get an error that states:
trout.rb:1:in `require'': no such file to load -- wxruby (Load Error)
from trout.rb:1:in `<main>''
What might be wrong?
--Alex
-----------------------------------------------
require ''wxruby''
class TroutApp < App
def on_init
frame = Wx::Frame.new(nil, -1, ''Tiny wxRuby Application'')
panel = Wx::StaticText.new(frame, -1, ''You are a trout!'',
Point.new(-1, 1), DEFAULT_SIZE,
ALIGN_CENTER)
frame.show
end
end
TroutApp.new.main_loop
--
Posted via http://www.ruby-forum.com/.
Tony Meier
2010-Mar-05 06:23 UTC
[wxruby-users] wxruby gem loaded, but require ''wxruby'' not found
try require ''wx''. -- Posted via http://www.ruby-forum.com/.
Alex DeCaria
2010-Mar-05 10:46 UTC
[wxruby-users] wxruby gem loaded, but require ''wxruby'' not found
Tony Meier wrote:> try require ''wx''.That worked! But now I get a window that pops up saying "The program can''t start because msvcrt-ruby18.dll is missing from your computer!" I''m using Ruby 1.9, so why is it looking for a Ruby 1.8 file? Does wxruby work with Ruby 1.9? Did I install the wrong gem? -- Alex -- Posted via http://www.ruby-forum.com/.