2
votes

My default ruby is 2.0.0p384.

A ruby script has:

#!/usr/bin/env ruby
require 'rubygems'
require 'httparty'

If the above header is changed to:

#!/usr/bin/ruby1.9.1

the script runs fine.

/var/lib/gems/2.0.0/gems/httparty-0.13.5 exists.

I can't understand why running the script with the 2.0.0 ruby gives:

/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:in require': cannot load such file -- httparty (LoadError) from usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:53:inrequire' from ./check_pingdom:30:in `'

the gem is installed for 1.9.1 but not for 2.0.0. are you using rbevn or rvm or doing everything by hand?Mircea
Hi Mircea. It is all manual. I want to have the least impact and footprint on the production system.smcracraft
the gem is installed for 1.9.1 but not for 2.0.0. try running "gem env" to see where it is attempting to pick up the gems.Mircea
gem env RubyGems Environment: - RUBYGEMS VERSION: 1.8.23 - RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [x86_64-linux] - INSTALLATION DIRECTORY: /var/lib/gems/1.9.1 - RUBY EXECUTABLE: /usr/bin/ruby1.9.1 :smcracraft
I have the same problem, did you solve it?Mina Wissa