Permalink
Browse files

Fix for modern rails

[git-p4: depot-paths = "//src/action_profiler/dev/": change = 5534]
  • Loading branch information...
drbrain committed Dec 10, 2009
1 parent b5fd1e2 commit 059372cd1008ccd1a642101fe28bb19d9d8b17f2
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/action_profiler/profiled_processor.rb
@@ -1,9 +1,10 @@
require 'optparse'
require 'config/environment'
-require 'application' # HACK Rails can't find this by itself
require 'action_profiler/test_processor'
+# HACK remove
+
def debug(msg)
$stderr.puts msg if $AP_DEBUG
end
@@ -29,6 +30,7 @@ def self.process_args(args = ARGV)
times = 1
opts = OptionParser.new do |opts|
+ opts.version = ActionProfiler::VERSION
opts.banner = "Usage: #{File.basename $0} [options] method [params [session [flash]]]"
opts.separator ''
@@ -89,7 +91,6 @@ def self.process_args(args = ARGV)
begin
Dir.chdir app_path
require 'config/environment'
- require 'application' # HACK Rails can't find this by itself
rescue LoadError => e
debug "Application load error \"#{e.message}\""
raise OptionParser::InvalidArgument, "could not load application, check your path"

0 comments on commit 059372c

Please sign in to comment.