I have a small application which I created using jeweler. The jeweler generates a lib/ directory, where I suppose to write my code.
This gem I'm creating depends on the httparty gem, so, in my Rakefile I put
Jeweler::Tasks.new do |gem|
gem.add_dependency('httparty', '>= 0.4.5')
...
end
in my implementation file I put
require 'httparty'
but when I executes it I get:
lib/my_app.rb:1:in `require': no such file to load -- httparty (LoadError)
I have already installed the httparty gem using
sudo gem install httparty
What is missing?
You need to require rubygems before requiring any gem.
require 'rubygems'
require 'httparty'
You need to require rubygems
require 'rubygems'
before you require httparty
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With