I'm trying to load `rack/test` into my application, but it's not working for some reason. When I do:
gem list rack-test
I get
rack-test (0.6.2)
So it's installed.
I can also get the path with:
gem which rack/test
which is
/home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2/lib/rack/test.rb
But then
ruby -e 'puts $LOAD_PATH.inspect; $LOAD_PATH << "/home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/"; require "rack/test"'
yields
["/home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1", "/home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/i686-linux", "/home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby", "/home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/vendor_ruby/1.9.1", "/home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/vendor_ruby/1.9.1/i686-linux", "/home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/vendor_ruby", "/home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1", "/home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/i686-linux"]
/home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- rack/test (LoadError)
from /home/jacky/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from -e:1:in `<main>'
What am I doing wrong?
Solved by reinstalling rvm. There was a superfluous ruby executable for some reason and it messed things up.