Sign in through GitHub

Gary 's Profile

GitHub User: garylai1990

Comments by Gary

Avatar

Thanks for this episode. It's very clearly, but I have some error on this episode.

I asked on stackoverflow, but there're no one can answer me. Hope can help me. Thanks!

http://stackoverflow.com/questions/11793788/gem-koala-undefined-methods-get-object

Avatar

I also met some problem .

/config/initializers/omniauth.rb
OmniAuth.config.logger = Rails.logger

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_SECRET']
end

When I put the first lineOmniAuth.config.logger = Rails.logger in this file, I run rails s , and the terminal said:

/Users/laigary/Documents/rails/nckucourse/config/initializers/omniauth.rb:1:in `<top (required)>': undefined method `logger=' for #<OmniAuth::Configuration:0x007fd4d3a34c38> (NoMethodError)
...
...
...

When I delete the first line OmniAuth.config.logger = Rails.logger , it works.

How can I solve this problem?

Avatar

Thanks, but it seems set in my computer, doesn't it?
I ask this question on the stackoverflow as well. Someone said :
"You just add this ENV['FACEBOOK_APP_ID'] = "yourapikey" into config/environments/development.rb or config/environments/production.rb"

What's the different?

Avatar

Sorry, I'm first time to use omniauth. and have question about ENV["FACEBOOK_APP_ID"]

Should I replace FACEBOOK_APP_ID to my facebook app id, or I should set FACEBOOK_APP_ID in somewhere?