diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-09-25 21:17:38 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-09-25 21:17:38 -0500 |
commit | bace497aea7be4d4b1bab13a6ccbfbb297550544 (patch) | |
tree | 8f8f89453dc64fd1d7ec05c0abb088cad03680e0 /railties | |
parent | 382870f763d8f51a49d3379cf5f3e93d59ab1abf (diff) | |
download | rails-bace497aea7be4d4b1bab13a6ccbfbb297550544.tar.gz rails-bace497aea7be4d4b1bab13a6ccbfbb297550544.tar.bz2 rails-bace497aea7be4d4b1bab13a6ccbfbb297550544.zip |
Remove relative url configuration from script/server
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/commands/server.rb | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb index 54d512dd67..743e5a0b07 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -9,8 +9,7 @@ options = { :environment => (ENV['RAILS_ENV'] || "development").dup, :config => RAILS_ROOT + "/config.ru", :detach => false, - :debugger => false, - :path => nil + :debugger => false } ARGV.clone.options do |opts| @@ -25,7 +24,6 @@ ARGV.clone.options do |opts| opts.on("-e", "--environment=name", String, "Specifies the environment to run this server under (test/development/production).", "Default: #{options[:environment]}") { |v| options[:environment] = v } - opts.on("-P", "--path=/path", String, "Runs Rails app mounted at a specific path.", "Default: #{options[:path]}") { |v| options[:path] = v } opts.separator "" @@ -44,7 +42,7 @@ unless server end puts "=> Booting #{ActiveSupport::Inflector.demodulize(server)}" -puts "=> Rails #{Rails.version} application starting on http://#{options[:Host]}:#{options[:Port]}#{options[:path]}" +puts "=> Rails #{Rails.version} application starting on http://#{options[:Host]}:#{options[:Port]}}" %w(cache pids sessions sockets).each do |dir_to_make| FileUtils.mkdir_p(File.join(RAILS_ROOT, 'tmp', dir_to_make)) @@ -72,20 +70,11 @@ else inner_app = Object.const_get(File.basename(config, '.rb').capitalize) end -if options[:path].nil? - map_path = "/" -else - ActionController::Base.relative_url_root = options[:path] - map_path = options[:path] -end - app = Rack::Builder.new { use Rails::Rack::LogTailer unless options[:detach] use Rails::Rack::Debugger if options[:debugger] - map map_path do - use Rails::Rack::Static - run inner_app - end + use Rails::Rack::Static + run inner_app }.to_app puts "=> Call with -d to detach" |