diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-06 12:24:21 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-06 12:24:21 +0000 |
commit | 5718eb190cc3485e6ba16dc7653ecd3e313ba90c (patch) | |
tree | 1c10121f346dcc887a73170684043f6285a31fef /railties/lib | |
parent | 6d566e82b40d636c13ee1ae3b59737e0620196af (diff) | |
download | rails-5718eb190cc3485e6ba16dc7653ecd3e313ba90c.tar.gz rails-5718eb190cc3485e6ba16dc7653ecd3e313ba90c.tar.bz2 rails-5718eb190cc3485e6ba16dc7653ecd3e313ba90c.zip |
Fixed WEBrick server to use ABSOLUTE_RAILS_ROOT instead of working_directory #687 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@839 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/webrick_server.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb index 26445e403b..49244837ef 100644 --- a/railties/lib/webrick_server.rb +++ b/railties/lib/webrick_server.rb @@ -6,6 +6,7 @@ require 'stringio' include WEBrick +ABSOLUTE_RAILS_ROOT = File.expand_path(RAILS_ROOT) class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet REQUEST_MUTEX = Mutex.new @@ -18,12 +19,12 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet trap("INT") { server.shutdown } server.start - Dir::chdir(OPTIONS['working_directory']) if OPTIONS['working_directory'] end def initialize(server, options) @server_options = options @file_handler = WEBrick::HTTPServlet::FileHandler.new(server, options[:server_root]) + Dir.chdir(ABSOLUTE_RAILS_ROOT) super end |