
undefined method `reset_runtime' for DataMapper::Adapters::MysqlAdapter
Reported by Kevin Watt | July 25th, 2010 @ 01:20 AM
I'm now getting this with rspec tests:
1) TopicsController GET index assigns all boards as @boards
Failure/Error: get :index
undefined method reset_runtime' for
#<DataMapper::Adapters::MysqlAdapter:0x104160ad0><br/>
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/dm-rails-1.0.0/lib/dm-rails/railties/controller_runtime.rb:18:in
cleanup_view_runtime'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/action_controller/metal/instrumentation.rb:38:in
render'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/action_controller/metal/implicit_render.rb:10:in
default_render'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/action_controller/metal/implicit_render.rb:5:in
send_action'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/abstract_controller/base.rb:145:in
process_action'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/action_controller/metal/rendering.rb:11:in
process_action'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/abstract_controller/callbacks.rb:18:in
process_action'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.0.beta4/lib/active_support/callbacks.rb:468:in
_run__599332899__process_action__199225275__callbacks'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.0.beta4/lib/active_support/callbacks.rb:408:in
send'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.0.beta4/lib/active_support/callbacks.rb:408:in
_run_process_action_callbacks'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.0.beta4/lib/active_support/callbacks.rb:88:in
send'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.0.beta4/lib/active_support/callbacks.rb:88:in
run_callbacks'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/abstract_controller/callbacks.rb:17:in
process_action'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/action_controller/metal/instrumentation.rb:29:in
process_action'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.0.beta4/lib/active_support/notifications/instrumenter.rb:20:in
instrument'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.0.beta4/lib/active_support/notifications.rb:48:in
__send__'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/activesupport-3.0.0.beta4/lib/active_support/notifications.rb:48:in
instrument'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/action_controller/metal/instrumentation.rb:28:in
process_action'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/action_controller/metal/rescue.rb:8:in
process_action'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/abstract_controller/base.rb:114:in
process'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/abstract_controller/rendering.rb:40:in
process'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/action_controller/metal/testing.rb:12:in
process_with_new_base_test'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/action_controller/test_case.rb:392:in
process'
/Users/inspire/.rvm/gems/ree-1.8.7-2010.02/gems/actionpack-3.0.0.beta4/lib/action_controller/test_case.rb:330:in
get' ./spec/controllers/topics_controller_spec.rb:47 Any
tips? It happens both with and without using the database_cleaner
start/clean steps. It only seems to happen with the first rspec
test, strange.<br/> describe "GET index" do<br/> it
"assigns all boards as @boards" do<br/> get :index # lazy
loading will screw this up? assigns(:boards).should == Board.all
end<br/> end
A workaround seems to be this:
class DataMapper::Adapters::AbstractAdapter
def reset_runtime
0.0
end end
I bet it messes up tracking view runtime amounts, but I don't care about that right now :)
There's a (seemingly related) ticket here http://datamapper.lighthouseapp.com/projects/20609-datamapper/ticke...
Comments and changes to this ticket
-
Dan Kubb (dkubb) July 28th, 2010 @ 12:22 PM
- State changed from new to unconfirmed
- Assigned user set to Martin Gamsjaeger (snusnu)
-
Martin Gamsjaeger (snusnu) August 10th, 2010 @ 05:49 PM
- Tag set to dm-rails rails3
This should be resolved in dm-rails 1.0.3. Kevin, can you confirm that?
-
Martin Gamsjaeger (snusnu) September 13th, 2010 @ 09:51 AM
- State changed from unconfirmed to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »