Uninitialized constant Instagram

自古美人都是妖i 提交于 2019-12-24 11:35:06

问题


I have a site, that is using Instagram api and there I'm getting this kind of error, when I'm running "rails c" or "rails server", /vagrant/Documents/RubyProjects/photo/config/initializers/instagram.rb:3:in `': uninitialized constant Instagram (NameError) I suppose it means that rails can't find instagram class or module. But there's a definition of instagram gem in my gemfile gem 'instagram' and in the bundle show command contains * instagram (1.1.1)*. The error is pointing at this:

require "instagram"

Instagram.configure do |config|   <- where error points to
  config.client_id = "*****************"
  config.client_secret = "*************************"
  config.access_token = "***************************************"
end

I'm a beginner in all this rails things, so I really don't, what's wrong here. Thx for answering in advance.

来源:https://stackoverflow.com/questions/24344286/uninitialized-constant-instagram

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!