Browse Source

just print the error, but don't give specific advice

Brent Cook 5 months ago
parent
commit
180c395aa3
1 changed files with 5 additions and 15 deletions
  1. 5
    15
      config/boot.rb

+ 5
- 15
config/boot.rb View File

@@ -1,6 +1,5 @@
1 1
 require 'pathname'
2 2
 require 'rubygems'
3
-require 'scanf'
4 3
 
5 4
 GEMFILE_EXTENSIONS = [
6 5
     '.local',
@@ -26,20 +25,11 @@ end
26 25
 begin
27 26
   require 'bundler/setup'
28 27
 rescue LoadError => e
29
-  msg = e.to_s
30
-  ver = msg.scanf("You have already activated bundler %d.%d.%d, but your Gemfile requires bundler %d.%d.%d.")
31
-  if ver.length == 6
32
-    activated_ver = "#{ver[0]}.#{ver[1]}.#{ver[2]}"
33
-    wanted_ver = "#{ver[3]}.#{ver[4]}.#{ver[5]}"
34
-    $stderr.puts "[*] Bundler #{activated_ver} conflicts with Ruby #{RUBY_VERSION}'s default of #{wanted_ver}."
35
-    $stderr.puts
36
-    $stderr.puts "    $ gem uninstall bundler -v #{activated_ver}"
37
-  else
38
-    $stderr.puts "[*] Bundler failed to load: '#{e}'"
39
-    $stderr.puts "[*] Metasploit requires the Bundler gem to be installed. You may need to run:"
40
-    $stderr.puts
41
-    $stderr.puts "    $ gem install bundler"
42
-  end
28
+  $stderr.puts "[*] Bundler failed to load and returned this error:"
29
+  $stderr.puts
30
+  $stderr.puts "   '#{e}'"
31
+  $stderr.puts
32
+  $stderr.puts "[*] You may need to uninstall or upgrade bundler"
43 33
   exit(1)
44 34
 end
45 35
 

Loading…
Cancel
Save