我试图让omniauth-facebook
gem 在我的 Rails 2.3.4 应用程序中工作,但这omniauth-oauth2
取决于rack ~> 1.2
. 当我尝试在我的应用程序中要求它时,我收到以下错误消息:
[Dev]> require 'omniauth-facebook'
Gem::LoadError: can't activate rack (~> 1.2, runtime) for ["oauth2-0.8.0", "omniauth-oauth2-1.1.0", "omniauth-facebook-1.4.1"], already activated rack-1.0.1 for []
from /Library/Ruby/Site/1.8/rubygems.rb:233:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:249:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:248:in `each'
from /Library/Ruby/Site/1.8/rubygems.rb:248:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:249:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:248:in `each'
from /Library/Ruby/Site/1.8/rubygems.rb:248:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:249:in `activate'
from /Library/Ruby/Site/1.8/rubygems.rb:248:in `each'
from /Library/Ruby/Site/1.8/rubygems.rb:248:in `activate'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:35:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
from (irb):1
这个错误是由actionpack
2.3.4 要求引起的rack ~> 1.0.0
,所以omniauth-oauth2
到要求的时候~> 1.2
,1.0.1
已经加载并且它爆炸了
如何在不升级 Rails 版本的情况下解决这个问题?(会使用旧版本的omniauth-facebook
工作吗?)