From 1b816d502444ce2b3153d8c689d0057f1c257eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 29 Apr 2010 08:39:44 +0200 Subject: The rake task :environment now loads config/environment.rb instead of initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks. --- railties/lib/rails/generators/rails/app/templates/script/rails | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'railties/lib/rails/generators') diff --git a/railties/lib/rails/generators/rails/app/templates/script/rails b/railties/lib/rails/generators/rails/app/templates/script/rails index b01d1ee183..11bc1edde9 100644 --- a/railties/lib/rails/generators/rails/app/templates/script/rails +++ b/railties/lib/rails/generators/rails/app/templates/script/rails @@ -1,8 +1,5 @@ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. -ENV_PATH = File.expand_path('../../config/environment', __FILE__) -BOOT_PATH = File.expand_path('../../config/boot', __FILE__) -APP_PATH = File.expand_path('../../config/application', __FILE__) - -require BOOT_PATH +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) require 'rails/commands' -- cgit v1.2.3