diff options
Diffstat (limited to 'railties/lib/commands/server.rb')
-rw-r--r-- | railties/lib/commands/server.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/commands/server.rb b/railties/lib/commands/server.rb index 5330c050b9..d21e91f980 100644 --- a/railties/lib/commands/server.rb +++ b/railties/lib/commands/server.rb @@ -5,7 +5,7 @@ OPTIONS = { :port => 3000, :ip => "0.0.0.0", :environment => "development", - :server_root => File.expand_path(File.dirname(__FILE__) + "/../public/"), + :server_root => File.expand_path(RAILS_ROOT + "/public/"), :server_type => WEBrick::SimpleServer, :charset => "UTF-8", :mime_types => WEBrick::HTTPUtils::DefaultMimeTypes @@ -47,7 +47,7 @@ ARGV.options do |opts| end ENV["RAILS_ENV"] = OPTIONS[:environment] -require File.dirname(__FILE__) + "/../config/environment" +require RAILS_ROOT + "/config/environment" require 'webrick_server' OPTIONS['working_directory'] = File.expand_path(RAILS_ROOT) |