The ruby
directive in Gemfile is supported by bundler
1.12.0 or later. So, r19425 causes the following error when a user runs bundle install
if the version of bundler is prior to 1.12.0.
$ bundle -v
Bundler version 1.11.2
$ bundle install
[!] There was an error parsing `Gemfile`: no implicit conversion of Symbol into Integer. Bundler cannot continue.
# from /Users/maeda/redmines/trunk/Gemfile:3
# -------------------------------------------
#
> ruby '>= 2.3.0', '< 2.7.0'
# gem "bundler", ">= 1.5.0"
# -------------------------------------------
You can avoid the error by skipping the ruby
directive with the following patch. The version of Ruby is not checked if you run an older version of Bundler that does not support ruby
directive.
diff --git a/Gemfile b/Gemfile
index 78db5caf8..bcc58ee35 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-ruby '>= 2.3.0', '< 2.7.0'
+ruby '>= 2.3.0', '< 2.7.0' if Bundler::VERSION >= '1.12.0'
gem "bundler", ">= 1.5.0"
gem "rails", "5.2.4.1"