# wxRuby install problem

**URL:** <https://www.ruby-forum.com/t/wxruby-install-problem/173901>\
**Category:** wxRuby\
**Created:** [August 18, 2009, 12:08am UTC](https://www.ruby-forum.com/t/wxruby-install-problem/173901 "2009-08-18T00:08:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pitosalas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a4c791/32.png) [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Post date:** [August 18, 2009, 12:08am UTC](https://www.ruby-forum.com/t/wxruby-install-problem/173901/1 "2009-08-18T00:08:02Z")

</div>

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/](http://gems.rubyforge.org/)  
Bulk updating Gem source index for: [http://gems.github.com/](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  
Password:  
—\> 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  
place:

~$ which ruby  
/opt/local/bin/ruby  
~$ which gem  
/opt/local/bin/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…

THANKS!

---

<div class="post-metadata">

**Author:** ![pitosalas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a4c791/32.png) [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Post date:** [September 7, 2009, 1:38am UTC](https://www.ruby-forum.com/t/wxruby-install-problem/173901/2 "2009-09-07T01:38:12Z")

</div>

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  
detail…

> ‘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.
