Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

janchiks's Profile

GitHub User: janchiks

Comments by

Avatar

followed the tutorial, but for the life of me cannot get this to work on rails 3.2.13 and ruby 2.0.0.
basically i get the following error with the controller's 'show' action:

ActiveRecord::RecordNotFound - Couldn't find Artwork with id=pirmais:
(gem) activerecord-3.2.13/lib/active_record/relation/finder_methods.rb:343:in find_one'
(gem) activerecord-3.2.13/lib/active_record/relation/finder_methods.rb:314:in
find_with_ids'
(gem) activerecord-3.2.13/lib/active_record/relation/finder_methods.rb:107:in find'
(gem) activerecord-3.2.13/lib/active_record/querying.rb:5:in
find'
(gem) cancan-1.6.9/lib/cancan/model_adapters/abstract_adapter.rb:20:in find'
(gem) cancan-1.6.9/lib/cancan/controller_resource.rb:114:in
find_resource'
(gem) cancan-1.6.9/lib/cancan/controller_resource.rb:68:in load_resource_instance'
(gem) cancan-1.6.9/lib/cancan/controller_resource.rb:32:in
load_resource'
(gem) cancan-1.6.9/lib/cancan/controller_resource.rb:25:in load_and_authorize_resource'
(gem) cancan-1.6.9/lib/cancan/controller_resource.rb:10:in
block in add_before_filter'
(gem) activesupport-3.2.13/lib/active_support/callbacks.rb:451:in _run__369076481886043173__process_action__2635143404322980588__callbacks'
(gem) activesupport-3.2.13/lib/active_support/callbacks.rb:405:in
run_callback'
(gem) activesupport-3.2.13/lib/active_support/callbacks.rb:385:in _run_process_action_callbacks'
(gem) activesupport-3.2.13/lib/active_support/callbacks.rb:81:in
run_callbacks'
(gem) actionpack-3.2.13/lib/abstract_controller/callbacks.rb:17:in process_action'
(gem) actionpack-3.2.13/lib/action_controller/metal/rescue.rb:29:in
process_action'
(gem) actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:30:in block in process_action'
(gem) activesupport-3.2.13/lib/active_support/notifications.rb:123:in
block in instrument'
(gem) activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in instrument'
(gem) activesupport-3.2.13/lib/active_support/notifications.rb:123:in
instrument'
(gem) actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:29:in process_action'
(gem) actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:207:in
process_action'
(gem) activerecord-3.2.13/lib/active_record/railties/controller_runtime.rb:18:in process_action'
(gem) actionpack-3.2.13/lib/abstract_controller/base.rb:121:in
process'
(gem) actionpack-3.2.13/lib/abstract_controller/rendering.rb:45:in process'
(gem) actionpack-3.2.13/lib/action_controller/metal.rb:203:in
dispatch'
(gem) actionpack-3.2.13/lib/action_controller/metal/rack_delegation.rb:14:in dispatch'
(gem) actionpack-3.2.13/lib/action_controller/metal.rb:246:in
block in action'
(gem) actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:in call'
(gem) actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:in
dispatch'
(gem) actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:36:in call'
(gem) journey-1.0.4/lib/journey/router.rb:68:in
block in call'
(gem) journey-1.0.4/lib/journey/router.rb:56:in each'
(gem) journey-1.0.4/lib/journey/router.rb:56:in
call'
(gem) actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:612:in call'
(gem) warden-1.2.1/lib/warden/manager.rb:35:in
block in call'
(gem) warden-1.2.1/lib/warden/manager.rb:34:in catch'
(gem) warden-1.2.1/lib/warden/manager.rb:34:in
call'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/best_standards_support.rb:17:in call'
(gem) rack-1.4.5/lib/rack/etag.rb:23:in
call'
(gem) rack-1.4.5/lib/rack/conditionalget.rb:25:in call'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/head.rb:14:in
call'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/params_parser.rb:21:in call'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/flash.rb:242:in
call'
(gem) rack-1.4.5/lib/rack/session/abstract/id.rb:210:in context'
(gem) rack-1.4.5/lib/rack/session/abstract/id.rb:205:in
call'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/cookies.rb:341:in call'
(gem) activerecord-3.2.13/lib/active_record/query_cache.rb:64:in
call'
(gem) activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in call'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:28:in
block in call'
(gem) activesupport-3.2.13/lib/active_support/callbacks.rb:405:in _run__4384397577656740839__call__2610537326534929259__callbacks'
(gem) activesupport-3.2.13/lib/active_support/callbacks.rb:405:in
run_callback'
(gem) activesupport-3.2.13/lib/active_support/callbacks.rb:385:in _run_call_callbacks'
(gem) activesupport-3.2.13/lib/active_support/callbacks.rb:81:in
run_callbacks'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:27:in call'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/reloader.rb:65:in
call'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/remote_ip.rb:31:in call'
(gem) better_errors-0.8.0/lib/better_errors/middleware.rb:84:in
protected_app_call'
(gem) better_errors-0.8.0/lib/better_errors/middleware.rb:79:in better_errors_call'
(gem) better_errors-0.8.0/lib/better_errors/middleware.rb:56:in
call'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/debug_exceptions.rb:16:in call'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/show_exceptions.rb:56:in
call'
(gem) railties-3.2.13/lib/rails/rack/logger.rb:32:in call_app'
(gem) railties-3.2.13/lib/rails/rack/logger.rb:16:in
block in call'
(gem) activesupport-3.2.13/lib/active_support/tagged_logging.rb:22:in tagged'
(gem) railties-3.2.13/lib/rails/rack/logger.rb:16:in
call'
(gem) quiet_assets-1.0.2/lib/quiet_assets.rb:18:in call_with_quiet_assets'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/request_id.rb:22:in
call'
(gem) rack-1.4.5/lib/rack/methodoverride.rb:21:in call'
(gem) rack-1.4.5/lib/rack/runtime.rb:17:in
call'
(gem) activesupport-3.2.13/lib/active_support/cache/strategy/local_cache.rb:72:in call'
(gem) rack-1.4.5/lib/rack/lock.rb:15:in
call'
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/static.rb:63:in call'
(gem) railties-3.2.13/lib/rails/engine.rb:479:in
call'
(gem) railties-3.2.13/lib/rails/application.rb:223:in call'
(gem) rack-1.4.5/lib/rack/content_length.rb:14:in
call'
(gem) railties-3.2.13/lib/rails/rack/log_tailer.rb:17:in call'
(gem) rack-1.4.5/lib/rack/handler/webrick.rb:59:in
service'
/Users/janis/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in service'
/Users/janis/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in
run'
/Users/janis/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

and from what i understand there is problem with this line in:
(gem) activerecord-3.2.13/lib/active_record/relation/finder_methods.rb

343 raise RecordNotFound, "Couldn't find #{@klass.name} with #{primary_key}=#{id}#{conditions}"

Any help appreciated. by the way, had the same error when tried to implement friendly_id gem.