ruby-on-rails - Omnisocial 依赖于 gem bcrypt-ruby 2.1,但 Rails 3.1 依赖于 bcrypt 3.0.0 - 我该怎么办?

标签 ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.1 omniauth

尝试测试这款外观精美的 gem - http://icelab.com.au/articles/welcome-to-the-omnisocial/ - 这 promise 可以将 Twitter 和 FB 登录轻松集成到我的应用程序中。

但是,当我运行 bundle install 时,我看到了这个:

Bundler could not find compatible versions for gem "bcrypt-ruby":
  In Gemfile:
    omnisocial depends on
      bcrypt-ruby (~> 2.1)

    bcrypt-ruby (3.0.0)

当我指定我希望 Bundler 使用 2.1 版时,我得到:

Bundler could not find compatible versions for gem "bcrypt-ruby":
  In Gemfile:
    bcrypt-ruby (~> 2.1)

    rails (= 3.1.0) depends on
      bcrypt-ruby (3.0.0)

所以现在我必须在 Omnisocial 或 Rails 3.1 之间做出选择。看起来是个糟糕的选择。

我该怎么做才能让它发挥作用?

最佳答案

我已经发布了新版本的 gem(出于法律原因,我不得不将其重命名为 omnipopulus)。这个新版本不依赖于任何特定版本的 bcrypt-ruby gem,因此您应该可以在 Rails 3.1 上运行它。

将此添加到您的 Gemfile 开始:

gem 'omnipopulus'

然后运行 ​​bundle 并按照 https://github.com/icelab/omnipopulus 的 README 中的说明进行操作

确保您已删除应用中对全社交的所有引用。

关于ruby-on-rails - Omnisocial 依赖于 gem bcrypt-ruby 2.1,但 Rails 3.1 依赖于 bcrypt 3.0.0 - 我该怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7454216/

相关文章:

ruby-on-rails - Rails 3.1.0.rc4 + Postgres - 重启后无法读取或写入数据库

MySQL Rails REGEXP 不能使用反斜杠

ruby-on-rails - 错误无法启动 Neo Server

ruby-on-rails - 测试没有通过

ruby-on-rails-3 - Ruby - jiraSOAP - 关闭 OpenSSL 证书验证

javascript - Rails 3.1 中页面特定的 javascript 文件

ruby-on-rails-3.1 - Rails Assets 管道 : Standard way for including all/vendor/assets/javascripts/?

ruby-on-rails - 在 text 属性中插入 Rails 对象的交叉超链接的解决方案(作为 HTML)

ruby-on-rails - 无法访问 attr_accessor 定义的变量

linux - 帮助使用 PDFKit 和 Rails 应用程序