From 7635c9f4c0f53714b46166224d604f0558b8525f Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 16 Oct 2009 19:27:03 -0500 Subject: script/generate should require environment --- railties/lib/rails/commands/generate.rb | 1 - railties/lib/rails/generators/rails/app/templates/script/generate.tt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'railties') diff --git a/railties/lib/rails/commands/generate.rb b/railties/lib/rails/commands/generate.rb index 22aefa803a..d91dcf9788 100755 --- a/railties/lib/rails/commands/generate.rb +++ b/railties/lib/rails/commands/generate.rb @@ -1,5 +1,4 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'generators')) -Rails.initialize! if ARGV.size == 0 Rails::Generators.help diff --git a/railties/lib/rails/generators/rails/app/templates/script/generate.tt b/railties/lib/rails/generators/rails/app/templates/script/generate.tt index 2a9d219531..26f029c6a6 100755 --- a/railties/lib/rails/generators/rails/app/templates/script/generate.tt +++ b/railties/lib/rails/generators/rails/app/templates/script/generate.tt @@ -1,3 +1,3 @@ <%= shebang %> -require File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/environment', __FILE__) require 'rails/commands/generate' -- cgit v1.2.3