I know that I can specify a Ruby version in a Gemfile like so:
ruby '2.0.0'
However, instead of setting the exact Ruby version, I'd like to be able to specify a minimum Ruby version so that my scripts remain compatible with new version of Ruby.
You could raise an exception instead:
raise 'Ruby should be >2.0' unless RUBY_VERSION.to_f > 2.0
Already possible since Bundler 1.12, e.g.
ruby "~> 2.3.0"
see here:
https://github.com/bundler/bundler-features/issues/119
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