mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user