Ruby stones do not load, even if they are installed

I know that there are similar questions on SO, but none of them solves my problem ... The bottom line is that I can’t get the gems to download on a clean version of Ruby 1.9.1 on Ubuntu 10.04:

:~/$ irb irb(main):001:0> require 'rubygems' => false irb(main):002:0> require 'cassandra' LoadError: no such file to load -- cassandra from (irb):1:in 'require' from (irb):1 from /usr/local/bin/irb:12:in '<main>' irb(main):003:0> Gem.path => ["/opt/ruby1.9/lib/ruby1.9/gems/1.9.1"] irb(main):004:0> exit :~/$ ls /opt/ruby1.9/lib/ruby/gems/1.9.1/gems/ cassandra-0.8.2 eventmachine-0.12.10 json-1.4.6 rake-0.8.7 simple_uuid-0.1.1 thrift-0.2.0.4 thrift-0.4.0 thrift_client-0.5.0 :~/$ gem list --local *** LOCAL GEMS *** cassandra (0.8.2) eventmachine (0.12.10) json (1.4.6) rake (0.8.7) simple_uuid (0.1.1) thrift (0.4.0, 0.2.0.4) thrift_client (0.5.0) :~/$ gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.9.1 (2009-05-12 patchlevel 129) [x86_64-linux] - INSTALLATION DIRECTORY: /opt/ruby1.9/lib/ruby/gems/1.9.1 - RUBY EXECUTABLE: /opt/ruby1.9/bin/ruby1.9 - EXECUTABLE DIRECTORY: /opt/ruby1.9/bin - RUBYGEMS PLATFORMS: - ruby - x86_64-linux - GEM PATHS: - /opt/ruby1.9/lib/ruby/gems/1.9.1 - /home/mark/.gem/ruby/1.9.1 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/ 

Any ideas? Thanks in advance...

+3
ruby ruby-on-rails rubygems
Sep 25 '10 at 1:34
source share
2 answers

Your gem env and Gem.path are incompatible.


Your Gem.path looks at ["/opt/ruby1.9/lib/ruby1.9/gems/1.9.1"] , but your gem env looks at /opt/ruby1.9/lib/ruby/gems/1.9.1

As a quick check, why not create a symlink from / opt / ruby ​​1.9 / lib / ruby ​​/ gems / 1.9.1 to / opt / ruby1.9 / lib / ruby1.9 / gems / 1.9.1 to / opt / ruby1 .9 / lib / ruby ​​/ gems / 1.9.1

 sudo ln -s /opt/ruby1.9/lib/ruby1.9/gems/1.9.1 /opt/ruby1.9/lib/ruby/gems/1.9.1 
+2
Sep 25 '10 at 8:36
source share

Also check permissions for all directories. The Ruby machine should be able to read them all.

+2
Sep 25 '10 at 13:57
source share



All Articles