wvanbergen/request-log-analyzer — Issue #104: Rails 3 log to DB
Author: nitsujri
Created: 2011-11-01 17:32:20+00:00
State: open

For rails 3, I followed the issue and fixed the line:

class_inheritable_accessor - changed to - class_attribute

When I fix that line I run:

request-log-analyzer --format rails3 -d requests.db production.log

Then I get:

connection_pool.rb:409:in `retrieve_connection': ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished)

request_log_analyzer/aggregator/database_inserter.rb:40:in `block in aggregate'

if there's anything I can do to help. Thanks guys this gem has helped me a lot!

request-log-analyzer --format rails3 -d requests.sqlite production.log
Request-log-analyzer, by Willem van Bergen and Bart ten Brinke - version 1.11.1
Website: http://railsdoctors.com

/Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:409:in retrieve_connection': ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished)
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:107:inretrieve_connection'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in connection'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/alias_tracker.rb:75:inconnection'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/alias_tracker.rb:54:in initial_count_for'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/alias_tracker.rb:12:inblock in initialize'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/alias_tracker.rb:29:in yield'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/alias_tracker.rb:29:indefault'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/alias_tracker.rb:29:in aliased_name_for'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/alias_tracker.rb:17:inaliased_table_for'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/join_helper.rb:15:in block in construct_tables'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/join_helper.rb:14:ineach'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/join_helper.rb:14:in construct_tables'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/association_scope.rb:49:inadd_constraints'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/association_scope.rb:33:in scope'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/association.rb:99:inassociation_scope'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/association.rb:88:in scoped'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/collection_association.rb:437:increate_scope'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/association.rb:238:in block in build_record'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/base.rb:1569:ininitialize'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/reflection.rb:190:in new'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/reflection.rb:190:inbuild_association'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/association.rb:236:in build_record'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/collection_association.rb:104:inbuild'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.1/lib/active_record/associations/collection_proxy.rb:54:in build'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/aggregator/database_inserter.rb:40:inblock in aggregate'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/aggregator/database_inserter.rb:36:in each'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/aggregator/database_inserter.rb:36:inaggregate'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/controller.rb:314:in block in aggregate_request'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/controller.rb:314:ineach'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/controller.rb:314:in aggregate_request'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/controller.rb:335:inblock in run!'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/source/log_parser.rb:327:in handle_request'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/source/log_parser.rb:291:inupdate_current_request'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/source/log_parser.rb:220:in parse_line'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/source/log_parser.rb:177:inparse_io_19'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/source/log_parser.rb:127:in block in parse_file'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/source/log_parser.rb:127:inopen'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/source/log_parser.rb:127:in parse_file'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/source/log_parser.rb:77:ineach_request'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/lib/request_log_analyzer/controller.rb:333:in run!'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/gems/request-log-analyzer-1.11.1/bin/request-log-analyzer:126:in'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/bin/request-log-analyzer:19:in load'
from /Users/justinlouie/.rvm/gems/ruby-1.9.2-p290/bin/request-log-analyzer:19:in'