Hi, I''ve installed and used wxRuby on Win32, and am trying to install it on Linux for the first time. I''m running Fedora Core 6. Here is what I have installed, but as shown below, when I try to load wx, I''m told it cannot be loaded. I get the same error when trying to run some of the sample wxruby scripts. Sorry for the newbie question, but am I missing something obvious? Thanks in advance. Roggie ----------------------- ruby-rdoc-1.8.5.2-1.fc6 ruby-libs-1.8.5.2-1.fc6 ruby-docs-1.8.5.2-1.fc6 ruby-1.8.5.2-1.fc6 ruby-ri-1.8.5.2-1.fc6 ruby-irb-1.8.5.2-1.fc6 ruby-mode-1.8.5.2-1.fc6 wxGTK-2.6.3-2.6.3.2.3.fc6 wxGTK-gl-2.6.3-2.6.3.2.3.fc6 rubygems-0.9.0 Via gems, Successfully installed wxruby2-preview-0.0.38-i686-linux irb(main):001:0> require ''wx'' LoadError: no such file to load -- wx from (irb):1:in `require'' from (irb):1 irb(main):002:0> ____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091
Hi Roggie Roggie Boone wrote:> Via gems, Successfully installed > wxruby2-preview-0.0.38-i686-linux > > irb(main):001:0> require ''wx'' > LoadError: no such file to load -- wx >Does it help if you put require ''rubygems'' before this? If you''ve installed wxruby as a gem, you must ensure that the rubygems library is loaded before you load wx. If this doesn''t help, please could you try doing require ''wxruby2'' after requiring rubgems, and sending us any error message you get. thanks alex
As a followup to my earlier post, it was requested that I try loading rubygems first. Here is what I get on Fedora Core 6 (and for additional info, I get the same thing on a Gentoo Linux setup). ------------------------ irb(main):001:0> require ''rubygems'' => true irb(main):002:0> require ''wx'' LoadError: /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686-linux/lib/wxruby2.so: cannot restore segment prot after reloc: Permission denied - /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686-linux/lib/wxruby2.so from /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686-linux/lib/wxruby2.so from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `require'' from /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686-linux/lib/wx.rb:12 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `gem_original_require'' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in `require'' from (irb):2 irb(main):003:0> ____________________________________________________________________________________ Have a burning question? Go to www.Answers.yahoo.com and get answers from real people who know.
Roggie Boone wrote:> Here is what > I get on Fedora Core 6 (and for additional info, > I get the same thing on a Gentoo Linux setup). > > ------------------------ > irb(main):001:0> require ''rubygems'' > => true > irb(main):002:0> require ''wx'' > LoadError: > /usr/lib/ruby/gems/1.8/gems/wxruby2-preview-0.0.38-i686-linux/lib/wxruby2.so: > cannot restore segment prot after reloc: Permission denied >This seems to be the problem. Apparently Fedora comes with SELinux enabled by default, which is what is stopping the wxruby library loading and giving this error message. I have no clue what SELinux is or is meant to do, but searching for "cannot restore segment prot after reloc" Fedora turned up a number of pages with what look to be likely solutions. hth alex