Specify range in ruby ​​bundler version

Is there a way to specify a range for the 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 work on gems, but perhaps this is not possible for the ruby ​​version. Or did I misunderstand my syntax?

+6
source share
2 answers

You cannot set the range for the ruby ​​version, see here

The syntax looks like this:

 ruby 'RUBY_VERSION', :engine => 'ENGINE', :engine_version => 'ENGINE_VERSION', :patchlevel => 'RUBY_PATCHLEVEL' 
+5
source

This is not possible in Bundler 1.x because it is not possible to do this while maintaining backward compatibility with the Gemfile.lock format.

As discussed there, this is probably a bad idea, unless the lockfile contains a ruby ​​version. Adding a ruby ​​version to the lock file means Bundler 2 as early as possible.

(from a problem that was sent asking to add a range function for Ruby versions )

+1
source

All Articles