Clarify versionconflict error

This commit is contained in:
Mitchell Hashimoto 2014-03-09 22:41:23 -07:00
parent cf8bfe0d7f
commit 641bfd0ee6
1 changed files with 10 additions and 5 deletions

View File

@ -58,12 +58,17 @@ end
# then also initialize the paths to the plugins. # then also initialize the paths to the plugins.
require "bundler" require "bundler"
begin begin
Bundler.setup(:default, :plugins) groups = [:default, :plugins]
rescue Bundler::VersionConflict Bundler.setup(*groups)
rescue Bundler::VersionConflict => e
$stderr.puts "Vagrant experienced a version conflict with some installed plugins!" $stderr.puts "Vagrant experienced a version conflict with some installed plugins!"
$stderr.puts "To fix this error, please update or remove the plugins which are" $stderr.puts "If you recently upgraded Vagrant, the recommended way to fix this is"
$stderr.puts "conflicting, and report this issue to the plugin creator. The conflict" $stderr.puts "to remove your existing plugins and reinstall them one-by-one. To"
$stderr.puts "is shown below:\n\n" $stderr.puts "remove all plugins:"
$stderr.puts ""
$stderr.puts " rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems"
$stderr.puts ""
$stderr.puts "The error message is shown below:\n\n"
$stderr.puts e.message $stderr.puts e.message
exit 1 exit 1
end end