wxRuby install problem

I was in a weird state. This post is long just because I give point by
point evidence to help you quickly spot where my brain drove off the
rails. The problem is that I have wxRuby installed (apparently) but ruby
doesn’t find it when running one of the wxRuby samples, and also ‘gem
which’ doesn’t seem to know what directory it’s in. I think, despite
trying to reset everything, there’s some left over state somewhere
that’s mucking up the works. Any help would be appreciated…

Here we go. Here’s the base state:

~$ sudo gem install wxruby
Bulk updating Gem source index for: http://gems.rubyforge.org/
Bulk updating Gem source index for: http://gems.github.com/
Successfully installed wxruby-1.9.3-universal-darwin
1 gem installed
~$ gem which wxruby
Can’t find wxruby
~$ gem which wxruby-1.9.3-universal-darwin
Can’t find wxruby-1.9.3-universal-darwin

and trying to run one of the samples gives me:

LoadError: no such file to load — wx

Ater messing around in a bunch of ways (resetting cache, uninstall and
reinstall the gem, and so on.) I decided to go back to a blank slate…
I did a complete update of Ruby on my Mac OS X 10.5.8:

~$ sudo port selfupdate

MacPorts base version 1.710 installed
Downloaded MacPorts base version 1.710

The MacPorts installation is not outdated so it was not updated

~$ sudo port upgrade ruby
… lots of stuff…but no errors
—> Cleaning ruby

And a reinstall of rubygems:

~$ sudo port install rb-rubygems
—> Staging rb-rubygems into destroot
—> Installing rb-rubygems @1.3.4_0
—> Activating rb-rubygems @1.3.4_0
—> Cleaning rb-rubygems

*** FIRST weird thing, even though stuff was reinstalled, there are
already gems there including wxRuby

~$ gem list

*** LOCAL GEMS ***

actionmailer (2.0.2)

wxruby (1.9.3)

BUT when I check ‘which’ I get an odd error. When I reinstall wxruby
again, it looks like it does something, but ‘gem which’ still fails, as
does running the app.

~$ gem which wxruby
Can’t find ruby library file or shared library wxruby
~$ sudo gem install wxruby
Successfully installed wxruby-2.0.0-universal-darwin-9
1 gem installed
Installing ri documentation for wxruby-2.0.0-universal-darwin-9…
Installing RDoc documentation for wxruby-2.0.0-universal-darwin-9…
~$ gem which wxruby
Can’t find ruby library file or shared library wxruby

Note that my ruby and rubygems are installed, by ‘port’ in it’s usual

~$ which ruby
~$ which gem

I am stumped. There’s some state left over but I thought I’d wasted too
much time and I’d ask for help…

Help? Any tips, I may be missing something obvious…


Pito S. wrote:

~$ gem which wxruby
Can’t find ruby library file or shared library wxruby

Hopefully, you found a solution already. If not, I get the same message
on mac os 10.4.11, but my wxruby works fine. You left out one important

‘gem which’ still fails, as
does running the app.

“running the app” doesn’t give much insight into what you are doing to
execute your program or what is actually in your program. By the way, a
program to test your wxruby install does not need to be more than 2
lines long, so don’t post anything longer than that.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs