diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-16 19:31:32 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-16 19:33:25 -0500 |
commit | f1640a165373f0e52ed36642479f3772318dab1f (patch) | |
tree | 9584601b3895e1037c64bd443aefc2cb6467fbbe /railties | |
parent | 8f2d8f452823791bb2dfbef4044f6cdac9a60a2e (diff) | |
download | rails-f1640a165373f0e52ed36642479f3772318dab1f.tar.gz rails-f1640a165373f0e52ed36642479f3772318dab1f.tar.bz2 rails-f1640a165373f0e52ed36642479f3772318dab1f.zip |
script/runner should require environment
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/commands/runner.rb | 2 | ||||
-rwxr-xr-x | railties/lib/rails/generators/rails/app/templates/script/runner.tt | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/railties/lib/rails/commands/runner.rb b/railties/lib/rails/commands/runner.rb index 84d72f9fa9..0246348c77 100644 --- a/railties/lib/rails/commands/runner.rb +++ b/railties/lib/rails/commands/runner.rb @@ -36,8 +36,6 @@ ARGV.delete(code_or_file) ENV["RAILS_ENV"] = options[:environment] RAILS_ENV.replace(options[:environment]) if defined?(RAILS_ENV) -Rails.initialize! - begin if code_or_file.nil? $stderr.puts "Run '#{$0} -h' for help." diff --git a/railties/lib/rails/generators/rails/app/templates/script/runner.tt b/railties/lib/rails/generators/rails/app/templates/script/runner.tt index 872ec07a1e..5fa1883694 100755 --- a/railties/lib/rails/generators/rails/app/templates/script/runner.tt +++ b/railties/lib/rails/generators/rails/app/templates/script/runner.tt @@ -1,3 +1,3 @@ <%= shebang %> -require File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../../config/environment', __FILE__) require 'rails/commands/runner' |