Skip to content

Instantly share code, notes, and snippets.

@snoblenet
Created February 11, 2010 12:01
Show Gist options
  • Save snoblenet/301455 to your computer and use it in GitHub Desktop.
Save snoblenet/301455 to your computer and use it in GitHub Desktop.
NoMethodError in ProjectsController#update
undefined method `class_name' for nil:NilClass
RAILS_ROOT: /Users/steven/Dropbox/Drominay
Application Trace | Framework Trace | Full Trace
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/whiny_nil.rb:52:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/reflection.rb:316:in `derive_class_name'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/reflection.rb:112:in `class_name'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/reflection.rb:156:in `klass'
/Library/Ruby/Gems/1.8/gems/friendly_id-2.3.1/lib/friendly_id/active_record2/configuration.rb:61:in `associated_friendly_classes'
/Library/Ruby/Gems/1.8/gems/friendly_id-2.3.1/lib/friendly_id/active_record2/configuration.rb:60:in `select'
/Library/Ruby/Gems/1.8/gems/friendly_id-2.3.1/lib/friendly_id/active_record2/configuration.rb:60:in `associated_friendly_classes'
/Library/Ruby/Gems/1.8/gems/friendly_id-2.3.1/lib/friendly_id/active_record2/configuration.rb:38:in `child_scopes'
/Library/Ruby/Gems/1.8/gems/friendly_id-2.3.1/lib/friendly_id/active_record2/slugged_model.rb:303:in `update_dependent_scopes'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in `send'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in `evaluate_method'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in `call'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:93:in `run'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:92:in `each'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:92:in `send'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:92:in `run'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in `run_callbacks'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:344:in `callback'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:283:in `update'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2874:in `create_or_update_without_callbacks'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:250:in `create_or_update'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2538:in `save_without_validation'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/validations.rb:1078:in `save_without_dirty'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/dirty.rb:79:in `save_without_transactions'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `send'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `with_transaction_returning_status'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:182:in `transaction'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:228:in `with_transaction_returning_status'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:196:in `save'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:196:in `save'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:2629:in `update_attributes'
/Users/steven/Dropbox/Drominay/app/controllers/projects_controller.rb:58:in `update'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/mime_responds.rb:106:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/mime_responds.rb:106:in `respond_to'
/Users/steven/Dropbox/Drominay/app/controllers/projects_controller.rb:57:in `update'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1331:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:1331:in `perform_action_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:617:in `call_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/flash.rb:146:in `perform_action'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:532:in `process_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/filters.rb:606:in `sass_old_process'
/Library/Ruby/Gems/1.8/gems/haml-2.2.19/lib/sass/plugin/rails.rb:19:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:391:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/base.rb:386:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:437:in `call'
Request
Parameters:
{"_method"=>"put",
"authenticity_token"=>"OsrvIdpW1zqJZXMjk2RlpvaW8liWVxb6GtXWkSomEPc=",
"id"=>"shower-system-that-traps-water-while-heating",
"project"=>{"name"=>"Shower system that traps water while heating xx",
"description"=>"This is a dummy project to demonstrate Drominay. The ideas is that a few minutes worth of cold water runs down the drain before the heat kicks in with most showers. This shower will trap and reuse that water."},
"save"=>"Save"}
Show session dump
Response
Headers:
{"Content-Type"=>"",
"Cache-Control"=>"no-cache"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment