I'm having trouble using newly installed gems - I think there must be something I'm missing, because I ran across the same error with both fb_graph and koala. I added the gem to my gemfile and then bundle install
ed it. I thought that was all you had to do, so I then tried using commands demonstrated in their respective wikis on github to see if they would work for me.
In the case of Koala, I added the line @graph = Koala::Facebook::GraphAPI.new
to my Pages controller which displays pages#home
. I got the error uninitialized constant PagesController::Koala
.
In the case of FB_Graph, I added the line user = FbGraph::User.me(ACCESS_TOKEN)
and got the error uninitialized constant PagesController::FBGraph
.
Clearly I'm not doing something right - maybe there's something about configuring gems I installed that I'm missing - not really sure. I've never really messed around with the FB API before, so it's possible the error is specifically related to FB gems. Please advise.
Try
gem install koala
gem install fb_graph
first
and restart your rails server and it should now have it.
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