I have been totally puzzled by what I think is a misconfiguration of my
gem environment. I’ve read and looked and experimented and tried to
solve this. Maybe you can help… Here’s the top level symptom. I install
a gem, and then do a ‘which’ and gem says it can’t find it:
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…
/opt/local/lib/ruby/gems/1.8$ gem which wxruby
Can’t find ruby library file or shared library wxruby
/opt/local/lib/ruby/gems/1.8$
This is not a peculiarity with this particular gem. There are others in
this odd state too. Here’s some more context:
GEM ENVIRONMENT
/opt/local/lib/ruby/gems/1.8$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9]
- INSTALLATION DIRECTORY: /opt/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /opt/local/bin/ruby
- EXECUTABLE DIRECTORY: /opt/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-darwin-9
- GEM PATHS:
- /opt/local/lib/ruby/gems/1.8
- /Users/pito/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => [“http://gems.rubyforge.org/”,
“http://gems.github.com”]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
-
http://gems.github.com
/opt/local/lib/ruby/gems/1.8$
GEM SPECIFICATION FOR THE GEM IN QUESTION
/opt/local/lib/ruby/gems/1.8$ gem specification wxruby
— !ruby/object:Gem::Specification
name: wxruby
version: !ruby/object:Gem::Version
version: 2.0.0
platform: universal-darwin-9
authors:
- wxRuby development team
autorequire:
bindir: bin
cert_chain: []
date: 2009-02-26 00:00:00 -05:00
default_executable:
dependencies: []
… much more …
OTHER SHELL ENV
/opt/local/lib/ruby/gems/1.8$ echo $PATH
/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
/opt/local/lib/ruby/gems/1.8$ echo $GEMPATH
/opt/local/lib/ruby/gems/1.8
/opt/local/lib/ruby/gems/1.8$