Use bundler/setup for more graceful bundler related failures

bug/bundler_fix
Jon Hart 2014-11-17 18:06:01 -08:00
parent 7daedac399
commit f51dd2b6f4
No known key found for this signature in database
GPG Key ID: 2FA9F0A3AFA8E9D3
1 changed files with 2 additions and 4 deletions

View File

@ -23,15 +23,13 @@ unless ENV['BUNDLE_GEMFILE']
end
begin
require 'bundler'
require 'bundler/setup'
rescue LoadError
$stderr.puts "[*] Metasploit requires the Bundler gem to be installed"
$stderr.puts " $ gem install bundler"
exit(0)
exit(1)
end
Bundler.setup
lib_path = root.join('lib').to_path
unless $LOAD_PATH.include? lib_path