Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install newer version of bundler with bundler

Tags:

ruby

bundler

If I change the version of bundler required in a Gemfile, and then type bundle, I get

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?

like image 446
Andrew Grimm Avatar asked Jun 04 '15 05:06

Andrew Grimm


People also ask

What is the difference between bundle install and bundle update?

The most common question I've heard about Bundler is about the difference between bundle install and bundle update . In a nutshell: bundle install handles changes to the Gemfile and bundle update upgrades gems that are already managed by Bundler.

What does bundle update -- bundler do?

bundle update is a command provided by the Bundler gem which will update all your gem dependencies to their latest versions. Providing you have a Gemfile. lock pre-existing, running bundle install will only install the versions specified in the Gemfile.


2 Answers

Seems like bundler can't bundle itself :)

So you have to run gem install bundler.

like image 187
osman Avatar answered Sep 24 '22 13:09

osman


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

like image 22
ltrainpr Avatar answered Sep 22 '22 13:09

ltrainpr