新的Omniauth 1.0.0是否适用于Devise?

时间:2011-11-03 18:05:22

标签: ruby-on-rails ruby-on-rails-3 devise omniauth

我目前正在使用:gem "omniauth", '0.3.2'

我正在尝试通过将上面的内容替换为:

来升级到omniauth 1.0.0
gem 'omniauth-github', :git => 'git://github.com/intridea/omniauth-github.git' # Core, requires a OA Stratedgy gem for each provider
gem 'omniauth-facebook', :git => 'git://github.com/mkdynamic/omniauth-facebook.git' # FB OmmiAuth Stratedgy
gem 'omniauth-contrib', :git => 'git://github.com/intridea/omniauth-contrib.git' # TWITTER OmmiAuth Stratedgy

但是当我捆绑安装/更新时出现错误:

$ bundle install
Updating git://github.com/intridea/omniauth-github.git
Updating git://github.com/mkdynamic/omniauth-facebook.git
Updating git://github.com/intridea/omniauth-contrib.git
Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "hashie":
  In snapshot (Gemfile.lock):
    hashie (1.1.0)

  In Gemfile:
    omniauth-facebook depends on
      hashie (~> 1.2)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler could not find compatible versions for gem "omniauth":
  In Gemfile:
    omniauth-contrib depends on
      omniauth (~> 1.0)

    omniauth-facebook depends on
      omniauth (1.0.0.rc2)

连连呢?思考? THX

1 个答案:

答案 0 :(得分:5)

我有同样的问题。要使用omniauth-facebook gem,您需要在Gemfile中安装omniauth 1.0:

gem“omniauth”,'> = 0.3.2'

这和捆绑更新为我解决了这个问题。