RoRomniauth 和 facebooker2

发布于 2025-01-01 16:05:42 字数 367 浏览 7 评论 0原文

在新的 Rails 3.1 应用程序中,仅在 Gemfile 中:

gem "omniauth" gem“facebooker2”

bundle install给出错误:

Bundler无法找到gem“hashie”的兼容版本: 在 Gemfile 中: facebooker2 (= 0.0.16) ruby​​ 取决于 hashie (~> 1.1.0) ruby

omniauth (>= 0) ruby depends on
  hashie (1.2.0)

​​ 如何使用omniauth 安装 facebooker2?

In a new application Rails 3.1 with only in Gemfile:

gem "omniauth"
gem "facebooker2"

bundle install give the error:

Bundler could not find compatible versions for gem "hashie":
In Gemfile:
facebooker2 (= 0.0.16) ruby depends on
hashie (~> 1.1.0) ruby

omniauth (>= 0) ruby depends on
  hashie (1.2.0)

How can I install facebooker2 with omniauth?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦中楼上月下 2025-01-08 16:05:42

我刚刚用这 2 个 gem 运行了捆绑包,它起作用了。

但是它确实安装了 facebooker2 0.0.12,而不是 0.0.16,

gem 'omniauth', '1.0.2'
gem 'facebooker2'

它也可以在不指定omniauth 版本的情况下工作,但我强烈建议使用 1.0.0 版本,因为存在巨大差异。主要的一点是所有的提供商现在都处于自己的优势之中。

如果捆绑安装不起作用,请运行捆绑更新。

我的 Gemfile.lock 的相关部分:

facebooker2 (0.0.12)
  mogli (>= 0.0.12)
  ruby-hmac
hashie (1.2.0)
hike (1.2.1)
httparty (0.8.1)
  multi_json
  multi_xml
...
mogli (0.0.28)
  httparty (>= 0.4.3)
omniauth (1.0.2)
  hashie (~> 1.2)
  rack

I just ran bundle with those 2 gems and it worked.

It did install facebooker2 0.0.12 however, and not 0.0.16

gem 'omniauth', '1.0.2'
gem 'facebooker2'

it also worked without specifying the omniauth version, but I highly recommend using the a 1.0.0 release as there are huge differences. The main one being all the providers are now in their own gems.

If bundle install doesn't work, run bundle update.

The relevant sections of my Gemfile.lock:

facebooker2 (0.0.12)
  mogli (>= 0.0.12)
  ruby-hmac
hashie (1.2.0)
hike (1.2.1)
httparty (0.8.1)
  multi_json
  multi_xml
...
mogli (0.0.28)
  httparty (>= 0.4.3)
omniauth (1.0.2)
  hashie (~> 1.2)
  rack
冰葑 2025-01-08 16:05:42

我解决这个问题的唯一方法是克隆 mogli 项目并将 hashie 依赖项更新为 1.2:

https://github.com/davidsf/mogli/commit/bcee3dd815bab7c8eb68511ee0d7c2da39115e14

The only way I have to solve the problem was to clone the mogli project and update the hashie dependence to 1.2:

https://github.com/davidsf/mogli/commit/bcee3dd815bab7c8eb68511ee0d7c2da39115e14

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文