in `require': cannot load such file — httparty (LoadError)

。_饼干妹妹 提交于 2019-12-12 22:16:36

问题


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 `'

来源:https://stackoverflow.com/questions/30584455/in-require-cannot-load-such-file-httparty-loaderror

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!