[英]uninitialized constant RoR
我用自己的寶石
class Periscoper
class Client
include HTTParty
attr_reader :secret, :key, :id, :username, :display_name, :cookie
base_uri 'https://api.periscope.tv/api/v2'
format :json
def initialize (key = nil, secret = nil)
p login(key, secret) if (secret && key)
end
....
end
end
在控制器中時,我確實遵循以下步驟:
periscope = Periscoper::Client.new(twitter.token, twitter.secret)
我得到這個:
未初始化的常量SessionsController :: Periscoper
periscope = ::Periscoper::Client.new(twitter.token, twitter.secret)
將最有可能解決問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.