diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-10-16 19:28:56 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-16 19:33:24 -0500 |
commit | 2f7217c76a68b048b15d2b8d821a2aa569ef924a (patch) | |
tree | 14b7fb8e5e6956ac669c43e7fe2cb87b960f9247 /railties | |
parent | 7635c9f4c0f53714b46166224d604f0558b8525f (diff) | |
download | rails-2f7217c76a68b048b15d2b8d821a2aa569ef924a.tar.gz rails-2f7217c76a68b048b15d2b8d821a2aa569ef924a.tar.bz2 rails-2f7217c76a68b048b15d2b8d821a2aa569ef924a.zip |
script/performance/benchmarker should require environment
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/commands/performance/benchmarker.rb | 3 | ||||
-rwxr-xr-x | railties/lib/rails/generators/rails/app/templates/script/performance/benchmarker.tt | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/railties/lib/rails/commands/performance/benchmarker.rb b/railties/lib/rails/commands/performance/benchmarker.rb index 5420b57311..dfba4bf034 100644 --- a/railties/lib/rails/commands/performance/benchmarker.rb +++ b/railties/lib/rails/commands/performance/benchmarker.rb @@ -12,7 +12,6 @@ end require 'benchmark' include Benchmark -Rails.initialize! # Don't include compilation in the benchmark ARGV.each { |expression| eval(expression) } @@ -21,4 +20,4 @@ bm(6) do |x| ARGV.each_with_index do |expression, idx| x.report("##{idx + 1}") { N.times { eval(expression) } } end -end +end diff --git a/railties/lib/rails/generators/rails/app/templates/script/performance/benchmarker.tt b/railties/lib/rails/generators/rails/app/templates/script/performance/benchmarker.tt index 90aca9b4e9..9ebc4c92fc 100755 --- a/railties/lib/rails/generators/rails/app/templates/script/performance/benchmarker.tt +++ b/railties/lib/rails/generators/rails/app/templates/script/performance/benchmarker.tt @@ -1,3 +1,3 @@ <%= shebang %> -require File.expand_path('../../../config/application', __FILE__) +require File.expand_path('../../../config/environment', __FILE__) require 'rails/commands/performance/benchmarker' |