From 70ac560e42644938392381ecd52efd7fb0260323 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 28 Apr 2007 15:57:29 +0000 Subject: Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6611 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/commands/servers/mongrel.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'railties/lib/commands/servers/mongrel.rb') diff --git a/railties/lib/commands/servers/mongrel.rb b/railties/lib/commands/servers/mongrel.rb index 995274f9a0..5eb14bce1e 100644 --- a/railties/lib/commands/servers/mongrel.rb +++ b/railties/lib/commands/servers/mongrel.rb @@ -12,13 +12,15 @@ OPTIONS = { :port => 3000, :ip => "0.0.0.0", :environment => (ENV['RAILS_ENV'] || "development").dup, - :detach => false + :detach => false, + :debugger => false } ARGV.clone.options do |opts| opts.on("-p", "--port=port", Integer, "Runs Rails on the specified port.", "Default: 3000") { |v| OPTIONS[:port] = v } opts.on("-b", "--binding=ip", String, "Binds Rails to the specified ip.", "Default: 0.0.0.0") { |v| OPTIONS[:ip] = v } opts.on("-d", "--daemon", "Make server run as a Daemon.") { OPTIONS[:detach] = true } + opts.on("-u", "--debugger", "Enable ruby-debugging for the server.") { OPTIONS[:debugger] = true } opts.on("-e", "--environment=name", String, "Specifies the environment to run this server under (test/development/production).", "Default: development") { |v| OPTIONS[:environment] = v } @@ -46,6 +48,8 @@ else ENV["RAILS_ENV"] = OPTIONS[:environment] RAILS_ENV.replace(OPTIONS[:environment]) if defined?(RAILS_ENV) + start_debugger if OPTIONS[:debugger] + require 'initializer' Rails::Initializer.run(:initialize_logger) -- cgit v1.2.3