Bundler Attempted to Update Rails but Its Version Stayed the Same
I'm Trying to Update the Rails 5.0.7 to 5.2 but It Is Showing That Bundler Attempted to Update Rails but Its Version Stayed the Same the Command Which I Tried...
I'm trying to update the rails 5.0.7 to 5.2 but it is showing that
Bundler attempted to update rails but its version stayed the same
the command which I tried to update are:-
rails app:update
but it is not updating the rails even I tried running the below code
bundle update rails
3 Answers
For people who came here to update their regular gem in my case I was trying to update
gem 'listen', '>= 3.0.5', '< 3.2'
this gem to version 3.2.1
It was limited with 3.2 so basically change it to
gem 'listen', '>= 3.0.5', '< 3.3'
please before updating version always look your gemfile.lock if there is blocking dependencies.
This can mean one of two things:
- You have a dependency for rails (a package that depends on rails in a version < 5.2
- You have specified a version for the rails (or it's gems) in your Gemfile, like
gem 'rails', '~> 5.0.6'orgem 'activerecord', '5.0'
On a side note, when updating rails, do not upgrade from 5.0 to 5.2, follow the upgrading guides at and do an incremental upgrade (one version at a time)
I ran into a similar issue trying to update a few stubborn gems. I recommend the standalone gem bundler-stats for figuring out what bundler is thinking, especially bundle-stats versions SOME_GEM_NAME. For more info check out this blog post.