Reputation: 151056
I tried using bundle update
for a Rails 3.0.0 project I created, expecting all the content in Gemfile
(and also Gemfile.lock
) to reflect rails 3.0.5...
But it keep on being 3.0.0... even if I run bundle update rails
, it still keep on being 3.0.0
Out of curiosity, I created a brand new Rails 3.0.0 project, and then run bundle update on it... and it still says "using rails 3.0.0", why? And how to make bundle update
update to 3.0.5? (other than the obvious way to change the Gemfile by hand)
(I even tried changing sqlite3-ruby
to sqlite3
in the Gemfile
, because 3.0.5 seems to use sqlite3
instead. And rails
and sqlite3
are the only 2 gems listed in Gemfile
)
Upvotes: 12
Views: 12138
Reputation: 8402
This is one of the top result when searching for "bundler wont update" on Google so I'm adding following as another answer. I was facing this issue in one of my projects.
In one of my projects I had a .bundle/config
file which had following line:
BUNDLE_FROZEN: "1"
This was causing bundle update <gemname>
to have no effect. I removed above line and it started updating again.
Upvotes: 1
Reputation: 2230
Yeah you probably have
gem 'rails', '3.0.0'
change it to
gem 'rails', '~>3.0.0'
This will only upgrade minor versions of rails(3.0.5 & 3.0.6 ...). Or you can change it to
gem 'rails', '~>3.0'
if you want to upgrade to rails 3.1 but not 4.0
Upvotes: 15
Reputation: 4807
You already had the answer: change the gem version by hand and run bundle update rails
.
I suspect you have gem 'rails', '3.0.0'
in your Gemfile. Running bundle update rails
won't change the version if you have the exact version specified.
Here's some info about the different ways of specifying gem versions in your Gemfile.
http://gembundler.com/rationale.html
Upvotes: 16