Search code examples
ruby-on-railsversion-controlrubygemsruby-on-rails-5rspec-rails

gem update to new version but gemlock is showing version lower to the updated one


I have updated the gem to version 4.0 but after running bundle update the Gemlock file is showing the verision as 3.9, It should ideally change the vesrion to 4.0 in gemlock as well right. And is it right way to change the version in gemlock with correspond to gemfile version. Please advise


Solution

  • Perhaps bundler couldn't update the version because of other dependencies. All others dependencies must compatible with 4.0 version, if not then bundler will not update the gem to higher version.

    Docs: https://bundler.io/v2.1/guides/using_bundler_in_applications.html#updating-gems---bundle-outdated-and-bundle-update