0
我第一次Facebook登錄集成到應用程序ROR爲我使用的初始化創建omniauth.rb文件後,以下tutorial我嘗試運行在終端 這個()命令我得到了一個錯誤:ROR 3應用程序在Facebook登錄中的錯誤登錄?
代碼在omniauth.rb文件是:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, 123432432433, 1233443232342432432
end
T'm收到此錯誤:
omniauth-tutorial/config/initializers/omniauth.rb:2: syntax error, unexpected tIDENTIFIER, expecting kEND (SyntaxError)
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `load'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in `load'
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/engine.rb:556
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/engine.rb:555:in `each'
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/engine.rb:555
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `send'
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/bilmailid17/appror/omniauth-tutorial/config/environment.rb:5
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/application.rb:83:in `require'
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/application.rb:83:in `require_environment!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/commands.rb:22
from script/rails:6:in `require'
from script/rails:6
試着把關鍵和祕密放在引號(「) – RAJ
作爲一個好的SO用戶,你應該接受一些你的問題的答案。 – RAJ
看看這個了 http://blog.joshsoftware.com/2010/12/16/multiple-applications-with-devise-omniauth-and-single-sign-on/ –