I have a local gem present that I can execute from script, shows up in my Gemfile.lock as installed, and returns true in rails console with "Gem.available?("< gem name >").
However, when I try to require this gem in order to call a script that relies on it through rails console (or rake task or a controller), I get "`require': cannot load such file -- < gem name> ".
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.25
- RUBY VERSION: 1.9.3 (2013-02-06 patchlevel 385) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/www-data/.rvm/gems/ruby-1.9.3-p385
- RUBY EXECUTABLE: /home/www-data/.rvm/rubies/ruby-1.9.3-p385/bin/ruby
- EXECUTABLE DIRECTORY: /home/www-data/.rvm/gems/ruby-1.9.3-p385/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/www-data/.rvm/gems/ruby-1.9.3-p385
- /home/www-data/.rvm/gems/ruby-1.9.3-p385@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org
irb:
$ irb
1.9.3-p385 :001 > require '<gem name>'
=> true
console:
RAILS_ENV=production rails console
Loading production environment (Rails 3.2.3)
1.9.3-p385 :001 > require '<gem name>'
LoadError: cannot load such file -- <gem name>
Is the console operating in a seperate environment? %x( which ruby ) would say no.. the gem also appears in my gem list for both bundle, Gemfile.lock, and %( gem list ) in the console.