Hi.
I installed the new stable Ruby release and when I began to install gems I found out that the paths to them isn't added to the Ruby load path after successful installation of the gems.
What is the reason of this issue? How can I achieve it?
Thanks.
Here's my environment:
$ lsb_release -d
Description: Debian GNU/Linux 5.0.6 (lenny)
$ cat ~/.gemrc
gem: --no-ri --no-rdoc gemhome: /home/<username>/.gem gempath: - /home/<username>/.gem
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
- INSTALLATION DIRECTORY: /home/<username>/.gem
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /home/<username>/.gem/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /home/<username>/.gem
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--no-ri --no-rdoc"
- "gemhome" => "/home/<username>/.gem"
- "gempath" => ["/home/<username>/.gem"]
- REMOTE SOURCES:
- http://rubygems.org/
$ gem list
*** LOCAL GEMS *** rack (1.2.1) sqlite3-ruby (1.3.1)
$ ruby -e "puts $:"
# There's neither /home/<username>/.gem/gems/rack-1.2.1/lib # nor home/<username>/.gem/gems/sqlite3-ruby-1.3.1/lib here. /usr/local/lib/ruby/site_ruby/1.9.1 /usr/local/lib/ruby/site_ruby/1.9.1/i686-linux /usr/local/lib/ruby/site_ruby /usr/local/lib/ruby/vendor_ruby/1.9.1 /usr/local/lib/ruby/vendor_ruby/1.9.1/i686-linux /usr/local/lib/ruby/vendor_ruby /usr/local/lib/ruby/1.9.1 /usr/local/lib/ruby/1.9.1/i686-linux
Updated
I can't require any of the installed gems because they arn't in $:.
$ ruby -e "require 'rack'; puts $:"
:29:in `require': no such file to load -- rack (LoadError)
from :29:in `require'
from -e:1:in `'
But.
$ ruby -e "$: << '/home/<username>/.gem/gems/rack-1.2.1/lib'; require 'rack'; puts $:"
/usr/local/lib/ruby/site_ruby/1.9.1 /usr/local/lib/ruby/site_ruby/1.9.1/i686-linux /usr/local/lib/ruby/site_ruby /usr/local/lib/ruby/vendor_ruby/1.9.1 /usr/local/lib/ruby/vendor_ruby/1.9.1/i686-linux /usr/local/lib/ruby/vendor_ruby /usr/local/lib/ruby/1.9.1 /usr/local/lib/ruby/1.9.1/i686-linux /home/<username>/.gem/gems/rack-1.2.1/lib # Here it is!
It works that way only : (