diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-04-28 15:57:29 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-04-28 15:57:29 +0000 |
commit | 70ac560e42644938392381ecd52efd7fb0260323 (patch) | |
tree | dbc0bc73d480bf3af99aef2f4be16afa183f4850 /railties/lib/commands/servers/mongrel.rb | |
parent | 1d5c34c2c27370356e8cd1ef478111802b6a5af4 (diff) | |
download | rails-70ac560e42644938392381ecd52efd7fb0260323.tar.gz rails-70ac560e42644938392381ecd52efd7fb0260323.tar.bz2 rails-70ac560e42644938392381ecd52efd7fb0260323.zip |
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
Diffstat (limited to 'railties/lib/commands/servers/mongrel.rb')
-rw-r--r-- | railties/lib/commands/servers/mongrel.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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) |