Skip to content
Browse files

lighttpd.conf should use CWD so the config file is portable across sy…

…stems, bad ulysses! ;)

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4000 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent c4d6b8b commit 925d149b3c43c6b04a692699df8acb0cb74b2acf @dhh dhh committed
Showing with 4 additions and 3 deletions.
  1. +4 −3 railties/lib/commands/servers/lighttpd.rb
View
7 railties/lib/commands/servers/lighttpd.rb
@@ -30,13 +30,14 @@
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)

0 comments on commit 925d149

Please sign in to comment.
Something went wrong with that request. Please try again.