From 000d692d3650b0c18d4300989a9ea41ef5f76c77 Mon Sep 17 00:00:00 2001 From: Josh Goebel Date: Tue, 7 Sep 2010 04:36:22 -0400 Subject: [PATCH] add RackEnv for rails as well to support seemless upgrading to 3.0 with config.ru --- app/scripts/config_installer.rb | 2 ++ test/config_installer_test.rb | 1 + 2 files changed, 3 insertions(+) diff --git a/app/scripts/config_installer.rb b/app/scripts/config_installer.rb index df7a340..b632bb3 100755 --- a/app/scripts/config_installer.rb +++ b/app/scripts/config_installer.rb @@ -65,6 +65,8 @@ def create_vhost_conf(index) (" ServerAlias #{app['aliases']}" unless app['aliases'].empty?), " DocumentRoot \"#{public_dir}\"", " #{app['app_type'].capitalize}Env #{app['environment']}", + # allow for later upgrade to rails 3 with config.ru file + (" RackEnv #{app['environment']}" if app['app_type']=="rails"), (app['user_defined_data'] unless app['user_defined_data'].empty?), "" ].compact.join("\n") diff --git a/test/config_installer_test.rb b/test/config_installer_test.rb index 7672dd1..bbc7da3 100644 --- a/test/config_installer_test.rb +++ b/test/config_installer_test.rb @@ -56,6 +56,7 @@ ServerAlias manfred-s-blog.local my-blog.local DocumentRoot "/User/het-manfred/rails code/blog/public" RailsEnv production + RackEnv production Order allow,deny Allow from all