Gems won't load
I've installed the development version of Crunchbang, a linux distro based off Debian. I got Ruby and Rubygems installed, but I can't get the gems I've installed to load. Here is a command-line session:
# ruby -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i486-linux]
# gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.6
- RUBY VERSION: 1.9.1 (2010-01-10 patchlevel 378) [i486-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby1.9.1/gems/1.9.1
- RUBY EXECUTABLE: /usr/bin/ruby1.9.1
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/lib/ruby1.9.1/gems/1.9.1
- /home/corey/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
# echo $PATH
/home/corey/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/corey/.gem/ruby/1.9.1:/usr/lib/ruby1.9.1/gems/1.9.1
# gem list -d nokogiri
`*** LOCAL GEMS ***`
nokogiri (1.4.1)
Authors: Aaron Patterson, Mike Dalessio
Rubyforge: http://rubyforge.org/projects/nokogiri
Homepage: http://nokogiri.org
Installed at: /usr/lib/ruby1.9.1/gems/1.9.1
Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser
# ruby -r rubygems -e "require 'nokogiri'"
-e:1:in `require': no such file to load -- nokogiri (LoadError)
from -e:1:in `<main>'
I've encountered similar problems on Ubuntu before, but they were easy to fix. I can't figure out what's wrong in this particular case, and Google didn't seem to know either. Any help would be greatly appreciated!
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Nick Quaranto on 12 May, 2010 04:17 AM
That's definitely wacky.... what happens if you just launch
irband doThe same? Maybe show us the output of
require 'pp'; pp $LOAD_PATHafter requiring RubyGems too.2 Posted by Corey on 12 May, 2010 12:11 PM
In that case, the required path is absent. I'm confused. IRB doesn't read the PATH when it starts?
Support Staff 3 Posted by Eric Hodel on 12 May, 2010 06:06 PM
"Based off Debian" is the problem. Ruby 1.9.1 ships with RubyGems which provides an alternative to RubyGems rubygems/custom_require.rb which Debian has removed.
Since RubyGems expects that alternative to exist custom_require won't be loaded on 1.9.1. I'm not sure what the official Debian solution to this problem is, but installing ruby from source will fix it.
Nick Quaranto closed this discussion on 17 Jul, 2010 08:30 PM.