捆绑包安装失败

发布于 2025-01-03 18:57:16 字数 568 浏览 4 评论 0原文

我在捆绑安装时遇到此错误

Gem::InstallError: devise_invitable requires RubyGems version ~> 1.3.6. Try 'gem update --system' to update RubyGems itself.
An error occured while installing devise_invitable (0.4.rc), and Bundler cannot continue.
Make sure that `gem install devise_invitable -v '0.4.rc'` succeeds before bundling.

,但是当我看到 ruby​​gems 的版本时,我

gem -v
1.8.10

对如何解决此问题有任何想法......这是我的 gemfile 的顶部

gem 'rails', '3.0.3'
gem 'devise', "1.2.rc"
gem 'devise_invitable', '0.4.rc'

I am getting this error on bundle install

Gem::InstallError: devise_invitable requires RubyGems version ~> 1.3.6. Try 'gem update --system' to update RubyGems itself.
An error occured while installing devise_invitable (0.4.rc), and Bundler cannot continue.
Make sure that `gem install devise_invitable -v '0.4.rc'` succeeds before bundling.

but when i see the version of rubygems i have

gem -v
1.8.10

any ideas on how to fix this....here is the top of my gemfile

gem 'rails', '3.0.3'
gem 'devise', "1.2.rc"
gem 'devise_invitable', '0.4.rc'

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

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

发布评论

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

评论(1

情定在深秋 2025-01-10 18:57:16

在 devise_invitable 的 gemspec 中,它们明确要求具有特定版本约束的 ruby​​gems、ruby 和捆绑器。虽然它们看起来应该没问题,因为它们使用的是 >=,但事实上它在控制台中显示为 ~> 就很说明问题。

~>的要求1.3.6 表示您需要安装 1.3.6 <= x << 的 ruby​​gems 版本1.4.0。

  1. 您可以尝试运行 bundle install 来获取兼容的 gem 版本,
  2. 但如果这不起作用,请尝试显式安装该版本 gem install ruby​​gems -v 1.3.6

In the gemspec for devise_invitable, they explicitly require rubygems, ruby and bundler with specific version constraints. While they look like they should be ok since they are using >=, the fact that it comes out in your console as ~> is telling.

The requirement of ~> 1.3.6 means you need to have a version of rubygems installed that is 1.3.6 <= x < 1.4.0.

  1. You could try running bundle install to get compatible gem versions
  2. But if that doesn't work, try installing the version explicitly gem install rubygems -v 1.3.6
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文