Reputation: 175
I'm trying to get Gibbon up and running. Eventually, I want to use the listSubscribe method, but for now, I'm trying to get my list ids and get Gibbon running. It's my first time using gems in my first app, although I inherited the app so it does use other gems already.
I'm getting an error:
uninitialized constant Gibbon::API
in app/controllers/my-controller.rb
in the controller, I have this code:@lists = Gibbon::API.lists
in the view, I have this code: <% @lists.list %>
in the gemfile, I have: gem 'gibbon', :git => 'https://github.com/amro/gibbon.git'
in /config/initializers/gibbon.rb:
Gibbon::API.api_key="my-API-key-here"
Gibbon::API.timeout=15
Gibbon::API.throws_exceptions = false
Things I've tried which didn't work:
1. I originally had just gem 'gibbon'
in the gemfile, but tried getting it from github instead of from RubyGems to make sure I had the latest version per this question. Why does gibbon throw 'uninitialized constant Gibbon::API (NameError)'
I tried doing a bundle install
per this question: How to fix the uninitialized constant Rake::DSL problem on Heroku?
Per another question on stack overflow, I confirmed that all my versions of everything (rails, ruby, and gibbon) are compatible. They are: rails 3.2.13 ruby 1.9.3p392 gibbon 0.5.0.
I'm not sure what is going on and how to fix this problem. How do I fix it? Thank you!
Upvotes: 1
Views: 1326
Reputation: 175
I needed to restart the Rails server after updating the Gemfile. Then it worked.
Upvotes: 1