lib/bundler/errors.rb in bundler-2.5.10 vs lib/bundler/errors.rb in bundler-2.5.12

- old
+ new

@@ -228,6 +228,20 @@ "Please change the permissions of this directory or choose a different install path." end status_code(38) end + + class CorruptBundlerInstallError < BundlerError + def initialize(loaded_spec) + @loaded_spec = loaded_spec + end + + def message + "The running version of Bundler (#{Bundler::VERSION}) does not match the version of the specification installed for it (#{@loaded_spec.version}). " \ + "This can be caused by reinstalling Ruby without removing previous installation, leaving around an upgraded default version of Bundler. " \ + "Reinstalling Ruby from scratch should fix the problem." + end + + status_code(39) + end end