Artem Gunkin
Artem Gunkin

Reputation: 61

uninitialized constant RoR

I use own gem

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

When in controller I do follow:

periscope = Periscoper::Client.new(twitter.token, twitter.secret)

I get this:

uninitialized constant SessionsController::Periscoper

Upvotes: 0

Views: 115

Answers (1)

Andrey Deineko
Andrey Deineko

Reputation: 52357

periscope = ::Periscoper::Client.new(twitter.token, twitter.secret)

will most likely solve the issue.

Upvotes: 1

Related Questions