Skip to content

Commit 0251291

Browse files
author
David Heinemeier Hansson
committed
You need the ruby-debug available in your Gemfile for debugger to work
1 parent cae2519 commit 0251291

File tree

2 files changed

+4
-1
lines changed
  • activesupport/lib/active_support/core_ext/kernel
  • railties/lib/rails/generators/rails/app/templates

2 files changed

+4
-1
lines changed

activesupport/lib/active_support/core_ext/kernel/debugger.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Kernel
22
unless respond_to?(:debugger)
33
# Starts a debugging session if ruby-debug has been loaded (call rails server --debugger to do load it).
44
def debugger
5-
message = "\n***** Debugger requested, but was not available: Start server with --debugger to enable *****\n"
5+
message = "\n***** Debugger requested, but was not available (ensure ruby-debug is listed in Gemfile/installed as gem): Start server with --debugger to enable *****\n"
66
defined?(Rails) ? Rails.logger.info(message) : $stderr.puts(message)
77
end
88
end

railties/lib/rails/generators/rails/app/templates/Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ gem '<%= gem_for_database %>'<% if require_for_database %>, :require => '<%= req
2323
# Deploy with Capistrano
2424
# gem 'capistrano'
2525
26+
# To use debugger
27+
# gem 'ruby-debug'
28+
2629
# Bundle the extra gems:
2730
# gem 'bj'
2831
# gem 'nokogiri', '1.4.1'

0 commit comments

Comments
 (0)