The Bundler version specified in the BUNDLED_WITH
section of your Gemfile.lock
file is now automatically installed and used to install the gems from your Gemfile. If you’ve been previously advised to change your Gemfile.lock
to specify an older version of Bundler such as 2.0.1
, that workaround is no longer necessary. See also respect "BUNDLED WITH" in Gemfile.lock to set bundler version · Issue #296 · netlify/build-image · GitHub.
3 Likes
If your site is set to use a Ruby version older than 2.3.0
and you have no Gemfile.lock
(or your Gemfile.lock
specifies a version of bundler that is 2.0.0
or greater), you may encounter a build failure with the message “bundler requires Ruby version >= 2.3.0”. While we plan to fix this, you can get it working right now with one of two methods:
- Make your build use a newer Ruby version by setting the
RUBY_VERSION
environment variable in the Netlify UI to2.3.0
or any newer version. - Add a
Gemfile.lock
created by a bundler version that is older than2.0.0
. To specify the version of bundler to run, install the desired bundler version then run bundle with the version surrounded by underscores as the first argument. For instance, to create aGemfile.lock
using bundler version1.17.3
, rungem install bundler:1.17.3
then runbundle _1.17.3_ lock
.