سؤال

I'm trying to use httparty

require 'httparty'

but I'm getting

no such file to load -- httparty (LoadError)

I'm using Ruby 1.8.7 on OSX

هل كانت مفيدة؟

المحلول

On Ruby 1.8, you have to do require "rubygems" before you can require any Gems in your code. So:

require "rubygems"
require "httparty"

# Your code here.
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top