Note that there are some explanatory texts on larger screens.

plurals
  1. PORuby can't find installed gems
    text
    copied!<p>I'm a bit at the end of my wits here. I'm on OSX10.6 and my gems are all screwed up. One of the gems I'm trying to use is Hashie. I've looked around on the internet and several people seem to be having similar problems but I none of their solutions seem to work in my case. Thanks for looking.</p> <p>All my ruby scripts / gems are installed in /opt/ruby-enterprise-1.8.7-2010.02:</p> <pre><code>Komputor:~$ which ruby gem irb rails /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby /opt/ruby-enterprise-1.8.7-2010.02/bin/gem /opt/ruby-enterprise-1.8.7-2010.02/bin/irb /opt/ruby-enterprise-1.8.7-2010.02/bin/rails </code></pre> <p>And the example gem, hashie (and many others) are installed:</p> <pre><code>Komputor:~ $ gem list -l | wc -l 67 Komputor:~ $ gem list | grep hashie hashie (0.4.0) Komputor:gems $ cd /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems Komputor:gems $ ls | grep hashie drwxr-xr-x 13 root admin 442 Nov 24 17:13 hashie-0.4.0 </code></pre> <p>Yet when I try to access them from irb or a script, it all fails:</p> <pre><code>Komputor:~ $ irb irb(main):001:0&gt; require 'hashie' LoadError: no such file to load -- hashie from (irb):1:in `require' from (irb):1 irb(main):002:0&gt; </code></pre> <p>Some environment variables: Gem env:</p> <pre><code>Komputor:gems $ gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.4.0] - INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8 - RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby - EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.02/bin - RUBYGEMS PLATFORMS: - ruby - x86-darwin-10 - GEM PATHS: - /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8 - /Users/&lt;snip&gt;/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources =&gt; true - :verbose =&gt; true - :benchmark =&gt; false - :backtrace =&gt; false - :bulk_threshold =&gt; 1000 - REMOTE SOURCES: - http://rubygems.org/ </code></pre> <p>$PATH:</p> <pre><code>Komputor:gems $ echo $PATH /sw/bin:/sw/sbin:/opt/ruby-enterprise-1.8.7-2010.02/bin:/Applications/android-sdk-1.5/tools:/usr/brlcad/bin:/usr/local/mysql-5.0.67-osx10.5-x86_64/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/mongodb/bin:/sw/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/usr/X11R6/bin </code></pre> <p>I'll be happy to post up the output of any commands for debugging.</p> <p>Thanks for looking!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload