diff options
Diffstat (limited to 'railties')
-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) |