lib/rails/commands/server.rb in railties-3.0.0.beta4 vs lib/rails/commands/server.rb in railties-3.0.0.rc

- old
+ new

@@ -7,11 +7,11 @@ class Options def parse!(args) args, options = args.dup, {} opt_parser = OptionParser.new do |opts| - opts.banner = "Usage: rails server [options]" + opts.banner = "Usage: rails server [mongrel, thin, etc] [options]" 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[:Host] = v } opts.on("-c", "--config=file", String, @@ -19,10 +19,13 @@ opts.on("-d", "--daemon", "Make server run as a Daemon.") { options[:daemonize] = 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 } + opts.on("-P","--pid=pid",String, + "Specifies the PID file.", + "Default: tmp/pids/server.pid") { |v| options[:pid] = v } opts.separator "" opts.on("-h", "--help", "Show this help message.") { puts opts; exit } end @@ -81,10 +84,11 @@ super.merge({ :Port => 3000, :environment => (ENV['RAILS_ENV'] || "development").dup, :daemonize => false, :debugger => false, - :pid => "tmp/pids/server.pid" + :pid => File.expand_path("tmp/pids/server.pid"), + :config => File.expand_path("config.ru") }) end end end