ruby 使用 bundler 安装更新版本的 bundler
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30635292/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Install newer version of bundler with bundler
提问by Andrew Grimm
If I change the version of bundler required in a Gemfile, and then type bundle, I get
如果我更改 Gemfile 中所需的 bundler 版本,然后键入bundle,我会得到
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (>= 1.10.2) ruby
Current Bundler version:
bundler (1.9.9)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (>= 1.10.2) ruby in any of the sources
Is it possible to ask bundler to install the new version of bundler, rather than typing in gem install bundler?
是否可以要求 bundler 安装新版本的 bundler,而不是输入gem install bundler?
回答by osman
Seems likebundler can't bundle itself :)
好像捆绑器不能捆绑自己:)
So you have to run gem install bundler.
所以你必须跑gem install bundler。
回答by ellemenno
as of v1.14 there is now: bundle update --bundler
从 v1.14 开始,现在有: bundle update --bundler
回答by ltrainpr
I think you can just run gem update bundler, right? It worked for me.
我想你可以跑gem update bundler,对吧?它对我有用。
回答by Daniel
If gem install bundlerdoes not upgrade your bundler version, then run gem install bundler --pre.
如果gem install bundler没有升级你的 bundler 版本,那么运行gem install bundler --pre.

