diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-20 06:17:55 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-20 06:17:55 +0000 |
commit | 925d149b3c43c6b04a692699df8acb0cb74b2acf (patch) | |
tree | 60b329671e3b9d8059af9743948a37fbaa888df6 /railties/lib/commands | |
parent | c4d6b8bb3c531d3e6571ec7b91382ceeb4b616f7 (diff) | |
download | rails-925d149b3c43c6b04a692699df8acb0cb74b2acf.tar.gz rails-925d149b3c43c6b04a692699df8acb0cb74b2acf.tar.bz2 rails-925d149b3c43c6b04a692699df8acb0cb74b2acf.zip |
lighttpd.conf should use CWD so the config file is portable across systems, bad ulysses! ;)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4000 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/commands')
-rw-r--r-- | railties/lib/commands/servers/lighttpd.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/railties/lib/commands/servers/lighttpd.rb b/railties/lib/commands/servers/lighttpd.rb index 1c30b8da7c..34b51f21b8 100644 --- a/railties/lib/commands/servers/lighttpd.rb +++ b/railties/lib/commands/servers/lighttpd.rb @@ -30,13 +30,14 @@ unless File.exist?(config_file) puts "=> #{config_file} not found." exit 1 end + require 'fileutils' + source = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "..", "configs", "lighttpd.conf")) puts "=> #{config_file} not found, copying from #{source}" - config = File.read source - config = config.gsub "CWD", File.expand_path(RAILS_ROOT).inspect - File.open(config_file, 'w') { |f| f.write config } + + FileUtils.cp(source, config_file) end config = IO.read(config_file) |