Is there a way to specify a range for ruby version?
ruby '~> 2.1.0'
Your Ruby version is 2.1.1, but your Gemfile specified ~> 2.1.0
ruby '>= 2.1.0'
Your Ruby version is 2.1.1, but your Gemfile specified >= 2.1.0
Obviously, ranges works for gems, but maybe it's not possible for ruby version. Or did I get my syntax wrong?
You can't set a range for the ruby version, see here
Syntax is like so:
ruby 'RUBY_VERSION', :engine => 'ENGINE', :engine_version => 'ENGINE_VERSION', :patchlevel => 'RUBY_PATCHLEVEL'
It is not possible in Bundler 1.x because it cannot be done maintaining backward compatibility with the format of Gemfile.lock
.
As discussed there, this is arguably a bad idea unless the lockfile contains the ruby version. Adding the ruby version to the lockfile means Bundler 2 at the earliest.
(from an issue that has been filed requesting the addition of a range feature for Ruby versions)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With