简体   繁体   中英

Ruby on Rails asking to put require and enable?

I'm not sure where to put require and enable?

I'm trying to use the instagram api, but it's telling me to put

require "sinatra"
require "instagram"

enable :sessions

in the sample application : https://github.com/Instagram/instagram-ruby-gem

But I'm new to learning rails, so I'm just trying figure some bits out,

Thanks

Thats for a sintatra app, not a rails app, for rails all I think you need to do is add it to your gemfile like so.

gem 'instagram'

If you still can't use it try adding :require, though I don't think you should have to.

gem 'instagram', :require => 'instagram'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM