aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-01-06 11:27:35 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-01-06 11:27:36 -0200
commit15971c3d51f549d91cf000d7c664ffb4335bef03 (patch)
tree4208179f1d7c9431f344a150c173cb1b3950fb6a
parentb8d9319e8e1c4f1940d1c3d64d439c54f133d1d2 (diff)
downloadrails-15971c3d51f549d91cf000d7c664ffb4335bef03.tar.gz
rails-15971c3d51f549d91cf000d7c664ffb4335bef03.tar.bz2
rails-15971c3d51f549d91cf000d7c664ffb4335bef03.zip
Rescue from LoadError when trying to load the debugger gem for console
Avoid swallowing all exceptions that might happen when requiring debugger, just catch a LoadError if it cannot be loaded. Check for more background: https://github.com/rails/rails/commit/28fd867c9bc790636d37a28f288791cd0089a6fd#commitcomment-2386952
-rw-r--r--railties/lib/rails/commands/console.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/console.rb b/railties/lib/rails/commands/console.rb
index 4497ef61df..86ab1aabbf 100644
--- a/railties/lib/rails/commands/console.rb
+++ b/railties/lib/rails/commands/console.rb
@@ -91,7 +91,7 @@ module Rails
def require_debugger
require 'debugger'
puts "=> Debugger enabled"
- rescue Exception
+ rescue LoadError
puts "You're missing the 'debugger' gem. Add it to your Gemfile, bundle, and try again."
exit
end