diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-29 09:15:47 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-08-29 09:15:47 +0000 |
commit | d2ceb1750873fcc3886a8e200372d3b6e0b21a43 (patch) | |
tree | 8cb9fee3d93a68738152468d31eec05178242c98 | |
parent | dafd5c14aeb9b2abd333c8af7aa4a587472bf9ca (diff) | |
download | rails-d2ceb1750873fcc3886a8e200372d3b6e0b21a43.tar.gz rails-d2ceb1750873fcc3886a8e200372d3b6e0b21a43.tar.bz2 rails-d2ceb1750873fcc3886a8e200372d3b6e0b21a43.zip |
remove superfluous ABSOLUTE_RAILS_ROOT from webrick server
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4841 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/lib/webrick_server.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb index 984638c8cc..533cf8c34b 100644 --- a/railties/lib/webrick_server.rb +++ b/railties/lib/webrick_server.rb @@ -7,8 +7,6 @@ require 'dispatcher' include WEBrick -ABSOLUTE_RAILS_ROOT = File.expand_path(RAILS_ROOT) - class CGI #:nodoc: def stdinput @stdin || $stdin @@ -68,7 +66,7 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet def initialize(server, options) #:nodoc: @server_options = options @file_handler = WEBrick::HTTPServlet::FileHandler.new(server, options[:server_root]) - Dir.chdir(ABSOLUTE_RAILS_ROOT) + Dir.chdir("#{RAILS_ROOT}/public") if defined?(RAILS_ROOT) && File.directory?("#{RAILS_ROOT}/public") super end |