Posted over 2 years ago. Visible to the public. Repeats.
How to update the bundler version in a Gemfile.lock
-
Install the latest
bundler
version:Copygem install bundler Fetching bundler-2.3.5.gem Successfully installed bundler-2.3.5 1 gem installed
-
Update the bundler version in
Gemfile.lock
:Copybundle update --bundler
-
Confirm it worked:
Copy$ tail -n2 Gemfile.lock BUNDLED WITH 2.3.5
Notes:
-
Bundler should automatically detect the latest installed version. If it does not, you can specify your preferred version like so:
Copybundle _2.1.2_ update --bundler
-
Older Ruby and Rails can not use the latest bundler 2 version, so you need to stay on bundler 1.
Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for unsupported versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2).