简体   繁体   English

我不断收到此错误'Bundler找不到与gem“ bundler”兼容的版本:'

[英]I keep getting this error ' Bundler could not find compatible versions for gem “bundler”: '

I'm running Ruby 1.9.3 and Rails 4.0.0, and I'm just starting to learn how to use Ruby on Rails. 我正在运行Ruby 1.9.3和Rails 4.0.0,而我刚开始学习如何使用Ruby on Rails。 Whenever I type the command to run the server: 每当我键入命令来运行服务器时:

    $ rails s

I get this error: 我收到此错误:

Bundler could not find compatible versions for gem "bundler":
    In Gemfile:
     rails (= 4.0.0) depends on
      bundler (< 2.0, >= 1.3.0)

   Current Bundler version:
     bundler (1.0.15)

So I updated it and then checked the version of the bundler using this command: 因此,我对其进行了更新,然后使用以下命令检查了捆绑程序的版本:

    $ gem list bundler 

And this is the result I get: 这是我得到的结果:

    *** LOCAL GEMS ***

    bundler (1.3.5, 1.3.0)

Although it says this, I still continue to get the error as mentioned above. 尽管这样说,但我仍然继续遇到上述错误。 Anyone know how to fix this? 有人知道怎么修这个东西吗? Thanks 谢谢

您可能必须在bundle exec之前加上前缀:

bundle exec rails server

You can check bundler's version using 您可以使用以下方法检查捆绑程序的版本

bundle -v

Prefixing your rails / rake command using bundle exec before will ensure ruby will use the gems required by your application. 在之前使用bundle exec前缀rails / rake命令将确保ruby使用应用程序所需的gem。

bundle exec rails s

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 得到错误&#39;Bundler无法找到gem“railties”的兼容版本 - Getting error 'Bundler could not find compatible versions for gem “railties”' Bundler 找不到 gem“bundler”的兼容版本: - Bundler could not find compatible versions for gem "bundler": Bundler找不到宝石“ bundler”的兼容版本 - Bundler could not find compatible versions for gem “bundler” Ruby 导轨错误:捆绑器找不到 gem“捆绑器”的兼容版本: - Ruby rails error: Bundler could not find compatible versions for gem "bundler": Bundler找不到宝石“ bundler”的兼容版本,问我我拥有的bundler和所需的bundler的不兼容版本 - Bundler could not find compatible versions for gem “bundler” asking me for the incompatible versions of the bundler i have and the bundler required 捆绑安装错误,原因是(捆绑商找不到与“捆绑商”宝石兼容的版本) - Getting error on bundle install as (Bundler could not find compatible versions for gem “bundler”) Bundler找不到与宝石“ rack”兼容的版本: - Bundler could not find compatible versions for gem “rack”: Bundler 找不到 gem &quot;activemodel&quot; 的兼容版本: - Bundler could not find compatible versions for gem "activemodel": Bundler找不到宝石“ spring”的兼容版本 - Bundler could not find compatible versions for gem “spring” Bundler找不到与gem兼容的版本 - Bundler could not find compatible versions for gem
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM