一个简单的 Ruby 代码
require 'rest-client'
server = "http://localhost:3000"
response = RestClient.get(server + "/posts.json")
它抛出一个异常
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- rest-client (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/alex/app1.rb:41:in `<main>'
[Finished in 0.1s with exit code 1]
rest-client gem
已安装。而且我使用的是 Ruby1.9.3
而不是更多,我的机器上1.9.1.
没有安装 ruby 。1.9.1
rvm rubies
ruby-1.9.2-p290 [ x86_64 ]
ruby-1.9.2-p320 [ x86_64 ]
=* ruby-1.9.3-p194 [ x86_64 ]
这是怎么回事,我要摆脱它吗?