使用bundler安装更新版本的bundler

时间:2021-03-02 00:18:52

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?

3 个解决方案

#1


25  

Seems like bundler can't bundle itself :)

好像捆绑包不能捆绑自己:)

So you have to run gem install bundler.

所以你必须运行gem install bundler。

#2


11  

I think you can just run gem update bundler, right? It worked for me.

我想你可以运行gem update bundler,对吗?它对我有用。

#3


-6  

Go to your gemfile.lock and change your bundler version to VERSION YOU WANT say (1.9.9) then,

转到你的gemfile.lock并将你的捆绑版本更改为VERSION你想说(1.9.9)然后,

run bundle install again

再次运行bundle install

#1


25  

Seems like bundler can't bundle itself :)

好像捆绑包不能捆绑自己:)

So you have to run gem install bundler.

所以你必须运行gem install bundler。

#2


11  

I think you can just run gem update bundler, right? It worked for me.

我想你可以运行gem update bundler,对吗?它对我有用。

#3


-6  

Go to your gemfile.lock and change your bundler version to VERSION YOU WANT say (1.9.9) then,

转到你的gemfile.lock并将你的捆绑版本更改为VERSION你想说(1.9.9)然后,

run bundle install again

再次运行bundle install