summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-10-20 20:40:37 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-10-20 20:40:37 -0500
commit9cd5c9d993e28abaee23f751a667d34eb668d817 (patch)
tree3f274b69735386ee15ca75876a5a04692937bcd9
parent1d08b681619ba4e5181fbb075f3e320298a669ae (diff)
downloadbundler-9cd5c9d993e28abaee23f751a667d34eb668d817.tar.gz
[Definition] Improve the warning when implicit locked ruby does not match
This should help people who run into version conflicts
-rw-r--r--lib/bundler/definition.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index caef918fb8..b11917ea35 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -492,7 +492,11 @@ module Bundler
"Your Ruby patchlevel is #{actual}, but your #{specified} #{expected}"
end
end
- msg += ". This may cause issues if there are any gems that were depending on that ruby version." if implicit_ruby_version
+ if implicit_ruby_version
+ msg += ". This may cause issues if there are any gems that were depending on that ruby version." \
+ "\nTo update the locked ruby version, run `bundle update --ruby`." \
+ "If that fails, run `bundle update` followed by `bundle update --ruby`."
+ end
raise RubyVersionMismatch, msg if !implicit_ruby_version || Bundler.feature_flag.bundler_2_mode?