#!/usr/bin/env ruby # cannot get my code to work error: ''gem_original_require" no such file to load -- Wx (LoadError) Attachments: http://www.ruby-forum.com/attachment/5292/ReactOS-0.3.11-REL-qemu.zip -- Posted via http://www.ruby-forum.com/.
I can''t get my script to run. It just gives me the error: /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'': no such file to load -- Wx (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' from /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 from -e:1:in `load'' from -e:1 Process finished with exit code 1 Attachments: http://www.ruby-forum.com/attachment/5296/MainFrame.rb -- Posted via http://www.ruby-forum.com/.
I got errors like this ("no such file to load") running 1.9 Ruby and installing the wrong wx. If you''re running 1.9, try this one: http://rubygems.org/gems/wxruby-ruby19 This whole 1.8/1.9 thing is a huge pain. Going into the interactive ruby and just typing require ''wx'' may be a quicker way to work on this issue. -- Posted via http://www.ruby-forum.com/.
Michael Gardiner wrote in post #959702:> I can''t get my script to run. It just gives me the error: > > /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) > /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'': no such file to load -- Wx (LoadError) > from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' > from > /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 > from -e:1:in `load'' > from -e:1 >The best you can do is to download the gem from rubyforge and install it with the gem command (gem install PATH_TO_THE_DOWNLOADED_GEM). For some reason installing wxruby via gems doesn''t work very well (it''s actually very unstable: it either can''t find any gems, or installs version 1.9 of wxRuby). I see you''re using ruby 1.8, so you''ll have to grab the package from http://rubyforge.org/frs/?group_id=35 hope that helps ?ukasz -- Posted via http://www.ruby-forum.com/.
It installed the gem. I am using ruby 1.8 and when i installed it it said: Warning: Installing to ~/.gem since /var/lib/gems/1.8 and /var/lib/gems/1.8/bin/crystalmoth/.gem/ruby/1.8/bin in your path. Warning: You don;t have /home/crystalmoth/.gem/ruby/1.8/bin in your path, gem executables will not run. Now I just get this message: /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /var/lib/gems/1.8/bin/rdebug-ide --port 59342 -- /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb Fast Debugger (ruby-debug-ide 0.4.7) listens on :59342 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 /var/lib/gems/1.8/gems/ruby-debug-ide-0.4.7/lib/ruby-debug.rb:109:in `debug_load'' /var/lib/gems/1.8/gems/ruby-debug-ide-0.4.7/lib/ruby-debug.rb:109:in `debug_program'' /var/lib/gems/1.8/gems/ruby-debug-ide-0.4.7/bin/rdebug-ide:87 /var/lib/gems/1.8/bin/rdebug-ide:19:in `load'' /var/lib/gems/1.8/bin/rdebug-ide:19 -e:1:in `load'' -e:1 Uncaught exception: no such file to load -- Wx Process finished with exit code 0 Do I just have to set my PATH? If so, how? -- Posted via http://www.ruby-forum.com/.
So i tried to put that second error message into my path and it seemed to work, kin of. Now I get this message when I try to run my scrip in RubyMine: /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'': no such file to load -- Wx (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' from /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 from -e:1:in `load'' from -e:1 Process finished with exit code 1 And this messag3e when I try to debug my script in rubymine: /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /var/lib/gems/1.8/bin/rdebug-ide --port 37753 -- /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb Process finished with exit code 0 -- Posted via http://www.ruby-forum.com/.
I think there''s a problem in this script, see attached. Attachments: http://www.ruby-forum.com/attachment/5301/14 -- Posted via http://www.ruby-forum.com/.
or see this attached Attachments: http://www.ruby-forum.com/attachment/5302/ReactOS-0.3.11-REL-qemu.zip -- Posted via http://www.ruby-forum.com/.
Or see this attached. Attachments: http://www.ruby-forum.com/attachment/5304/seethisattached -- Posted via http://www.ruby-forum.com/.
Michael Gardiner wrote in post #959862:> So i tried to put that second error message into my path and it seemed > to work, kin of. Now I get this message when I try to run my scrip in > RubyMine: > > /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) > /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require'': no such file to load -- Wx (LoadError) > from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' > from > /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 > from -e:1:in `load'' > from -e:1Looks like RubyMine doesn''t use your PATH variable. Can you try something like this: - after installing the gem, and adding .gem to your path ( do: export PATH=/home/crystalmoth/.gem/ruby/gems/1.8/gems:$PATH export PATH=/home/crystalmoth/.gem/ruby/1.8/bin:$PATH in the terminal or add these lines to your .profile/.bashrc ) Can you try running the MainFrame.rb directly from the command line (that''d be `ruby MainFrame.rb`) If that works that means you simply need to add the path to your local gems to RubyMine settings. Also - what OS are you using? (I''m assuming it''s either Linux or OSX) ?ukasz -- Posted via http://www.ruby-forum.com/.
I tried those lines of path code. It didn''t give me any errors, but then I tried running it from the terminal and got this message: /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in ''gem_original_require: no such file to load --Wx (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in ''require'' from MainFrame.rb:4 And I am using Ubuntu Lucid Lynx. I''ve attached the custom require file and my code. Under /usr/lib/Ruby I seem to have the folders 1.8, 1.9, 1.9.0, 1.9.1, and gems Could there be a conflict of different versions going on. Attachments: http://www.ruby-forum.com/attachment/5305/MainFrame.rb http://www.ruby-forum.com/attachment/5306/custom_require.rb -- Posted via http://www.ruby-forum.com/.
Michael Gardiner wrote in post #959939:> I tried those lines of path code. It didn''t give me any errors, but then > I tried running it from the terminal and got this message: > > /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in > ''gem_original_require: no such file to load --Wx (LoadError) > from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in...and here''s your problem In the attached example you have require ''Wx'' and it should be require ''wx'' # lowercase Once you change it wxRuby will be imported properly, the code won''t run though (I assume it''s a part of a bigger application) - try one of the minimal examples from the wxRuby site ( http://wxruby.rubyforge.org/wiki/wiki.pl?Getting_Started ) ?ukasz -- Posted via http://www.ruby-forum.com/.
I tried the Minimal App with the lowercase wx and it gave me no debug errors but when I tried to run it it said: /usr/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb /home/crystalmoth/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: /home/crystalmoth/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so: wrong ELF class: ELFCLASS32 - /home/crystalmoth/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wxruby2.so (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' from /home/crystalmoth/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/wx.rb:12 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require'' from /home/crystalmoth/RubymineProjects/wxRuby_CADaver/.idea/MainFrame.rb:4 from -e:1:in `load'' from -e:1 Process finished with exit code 1 -- Posted via http://www.ruby-forum.com/.