[英]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.