我一直在尝试在我的 Rails 代码中使用 HTTParty
sudo gem install httparty
从命令行我现在可以成功地做
httparty "http://twitter.com/statuses/public_timeline.json"
当我在我的 Rails 应用程序中尝试这个时
require 'rubygems'
require 'httparty'
class FooController < ApplicationController
include HTTParty
def bar
blah = HTTParty.get("http://twitter.com/statuses/public_timeline.json")
end
end
我收到错误消息“没有要加载的文件--httparty”
我怀疑我的环境有问题?