You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked out the project and when running build I saw the event counter engine failing with [1].
When I run its test.sh in isolation I see the same.
Looks like the auto_explain_threshold_in_seconds was removed from the dummy app production config but it's left on the development. Removing it from it fixes the problem.
diff --git a/components/event_counter/spec/dummy/config/environments/development.rb b/components/event_counter/spec/dummy/config/environments/development.rb
index 8559bc4..4b826ee 100644
--- a/components/event_counter/spec/dummy/config/environments/development.rb
+++ b/components/event_counter/spec/dummy/config/environments/development.rb
@@ -21,7 +21,7 @@ Dummy::Application.configure do
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
- config.active_record.auto_explain_threshold_in_seconds = 0.5
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
# Do not compress assets
config.assets.compress = false
I am more curious to find out how come CI didn't pick this one up and/or if my development machine has something special going on.
Cheers
[1]
*** Running event counter specs
rake aborted!
NoMethodError: undefined method `auto_explain_threshold_in_seconds=' for ActiveRecord::Base:Class
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activerecord-4.1.1/lib/active_record/railtie.rb:110:in `block (3 levels) in <class:Railtie>'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activerecord-4.1.1/lib/active_record/railtie.rb:109:in `each'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activerecord-4.1.1/lib/active_record/railtie.rb:109:in `block (2 levels) in <class:Railtie>'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activerecord-4.1.1/lib/active_record/railtie.rb:108:in `block in <class:Railtie>'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `public_send'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `method_missing'
/Users/eteotti/sandbox/the_next_big_thing/components/event_counter/spec/dummy/config/environment.rb:5:in `<top (required)>'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/railties-4.1.1/lib/rails/application.rb:264:in `require_environment!'
/Users/eteotti/.rvm/gems/ruby-2.1.0@global/gems/railties-4.1.1/lib/rails/application.rb:367:in `block in run_tasks_blocks'
/Users/eteotti/.rvm/gems/ruby-2.1.0@tnbt/bin/ruby_executable_hooks:15:in `eval'
/Users/eteotti/.rvm/gems/ruby-2.1.0@tnbt/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => app:db:migrate => app:environment
(See full trace by running task with --trace)
F
Failures:
1) EventCounter::Logger#log returns the new logged count
Failure/Error: subject.log("some_object", "some_event").should == 1
ActiveRecord::StatementInvalid:
SQLite3::SQLException: no such table: event_counter_counts: SELECT "event_counter_counts".* FROM "event_counter_counts" WHERE "event_counter_counts"."object_identifier" = 'some_object' AND "event_counter_counts"."event_identifier" = 'some_event' ORDER BY "event_counter_counts"."id" ASC LIMIT 1
# ./app/models/event_counter/logger.rb:4:in `log'
# ./spec/models/logger_spec.rb:7:in `block (3 levels) in <module:EventCounter>'
Finished in 0.00563 seconds
1 example, 1 failure
Failed examples:
rspec ./spec/models/logger_spec.rb:6 # EventCounter::Logger#log returns the new logged count
The text was updated successfully, but these errors were encountered:
agenteo
added a commit
to agenteo/the_next_big_thing
that referenced
this issue
Sep 2, 2014
I checked out the project and when running
build
I saw the event counter engine failing with [1].When I run its
test.sh
in isolation I see the same.Looks like the
auto_explain_threshold_in_seconds
was removed from the dummy app production config but it's left on the development. Removing it from it fixes the problem.I am more curious to find out how come CI didn't pick this one up and/or if my development machine has something special going on.
Cheers
[1]
The text was updated successfully, but these errors were encountered: