Problem installing wxruby on linux


I installed wxruby with ‘gem install wxruby’ and everything went ok.
Then I installed wxwidgets (wx2.8) and wx-common.
I run irb and write:
require ‘rubygems’
require ‘wx’
and get the following error:

LoadError: cannot open shared object file: No
such file or directory -

from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in require' from /home/haris/.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:ingem_original_require’
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require’
from (irb):3
from /usr/lib/ruby/1.8/rubygems/requirement.rb:22
#-------------------- is present in
/home/haris/.gem/ruby/1.8/gems/wxruby-2.0.1-x86-linux/lib/ directory
along with wx.rb

Why am I getting this error ?


I had the same problem.
What flavor of linux are you running? If it is Fedora release 11 or
you need to

  1. Downgrade SWIG to version 1.3.38 (1.3.39 or greater will not work)
  2. make sure you have the devlopment rpm installed for wx
  3. build wxruby from source then you can create a gem that will work
    your machine


Allan D.
Member of NetBeans Dream Team
Lead Developer, nbPython (my blog)
Co-Chair, CajunJUG

Haris B. wrote:


It seems you do not have at least part of the wx-widgets libraries
installed. Check in your package manager to make sure you have
wx-widgets-2.8 and (after this message) wx-widgets-stc-2.8 installed.

On Linux, the gem only installs the ruby interface to the wxWidgets
library, not the core wxWidgets library code itself.