I get two different results when using the two commands bundle
and bundle update
If I use bundle update
, I get the following error:
Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
In Gemfile:
requirejs-rails (>= 0) ruby depends on
railties (~> 3.1.1) ruby
rails (= 4.0.0.rc2) ruby depends on
railties (4.0.0.rc2)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
requirejs-rails (>= 0) ruby depends on
rails (~> 3.1.1) ruby
rails (4.0.0.rc2)
But if I use just bundle
, I get the following :
Resolving dependencies...
Bundler could not find compatible versions for gem "activesupport":
In snapshot (Gemfile.lock):
activesupport (3.2.2)
In Gemfile:
rails (= 4.0.0.rc2) ruby depends on
activesupport (= 4.0.0.rc2) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
The errors point to two different dependencie issues, but both commands are fetching gem metadata from https://rubygems.org/...
and Resolving dependencies...
, so how are they different?
I have always used just bundle
, but tried bundle update
and noticed the difference.
In a nutshell: bundle install handles changes to the Gemfile and bundle update upgrades gems that are already managed by Bundler.
http://viget.com/extend/bundler-best-practices
Needless to say that bundle
and bundle install
are the same command, install
is the default option for bundle
.
bundle
is the same as bundle install
, which does the following:
Gemfile.lock
exists. If it does, install all gems with the exact versions specified there.Gemfile
, using the latest available / allowable versions according to the Gemfile
. Then create the Gemfile.lock
to record what versions have been installed.bundle update
on the other hand, deletes / ignores your Gemfile.lock
and goes straight to step two.
The error you're seeing is probably because some gem wants active_support
to be in the 3.x.x
version range, while you seem to be trying to upgrade to Rails 4.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With