diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-16 19:27:03 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-16 19:33:24 -0500 |
commit | 7635c9f4c0f53714b46166224d604f0558b8525f (patch) | |
tree | 6a61fea0357696e1fc7fb4e14865b7e76187b493 /railties | |
parent | 7e9e370e031c20e36a52c04a20dbbd7b4fe4672f (diff) | |
download | rails-7635c9f4c0f53714b46166224d604f0558b8525f.tar.gz rails-7635c9f4c0f53714b46166224d604f0558b8525f.tar.bz2 rails-7635c9f4c0f53714b46166224d604f0558b8525f.zip |
script/generate should require environment
Diffstat (limited to 'railties')
-rwxr-xr-x | railties/lib/rails/commands/generate.rb | 1 | ||||
-rwxr-xr-x | railties/lib/rails/generators/rails/app/templates/script/generate.tt | 2 |
2 files changed, 1 insertions, 2 deletions
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' |