Skip to content

Instantly share code, notes, and snippets.

@r00k
Created April 19, 2010 15:24
Show Gist options
  • Save r00k/371151 to your computer and use it in GitHub Desktop.
Save r00k/371151 to your computer and use it in GitHub Desktop.
NoMethodError in DecksController#update
undefined method `original_filename' for "07 Sweet Pea.m4a":String
RAILS_ROOT: /home/rob/code/flashcards
Application Trace | Framework Trace | Full Trace
app/models/card_sound.rb:5:in `file='
app/models/card.rb:13:in `sound_file='
app/models/deck.rb:10:in `card_attributes='
app/models/deck.rb:8:in `each'
app/models/deck.rb:8:in `card_attributes='
app/controllers/decks_controller.rb:46:in `update'
app/controllers/decks_controller.rb:45:in `update'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2589:in `send'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2589:in `attributes='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2585:in `each'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2585:in `attributes='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2285:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/reflection.rb:157:in `new'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/reflection.rb:157:in `build_association'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/associations/association_collection.rb:413:in `build_record'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/associations/association_collection.rb:98:in `build'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2589:in `send'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2589:in `attributes='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2585:in `each'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2585:in `attributes='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2471:in `update_attributes'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/mime_responds.rb:106:in `call'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/mime_responds.rb:106:in `respond_to'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/base.rb:1256:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/base.rb:1256:in `perform_action_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/filters.rb:617:in `call_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/rescue.rb:136:in `perform_action_without_caching'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/caching/sql_cache.rb:13:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/query_cache.rb:8:in `cache'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/base.rb:524:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/base.rb:524:in `process_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/filters.rb:606:in `process_without_session_management_support'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/session_management.rb:134:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/base.rb:392:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:184:in `handle_request'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:112:in `dispatch_unlocked'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:125:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:124:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:124:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:134:in `dispatch_cgi'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:41:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.3/lib/webrick_server.rb:103:in `handle_dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.3/lib/webrick_server.rb:74:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:37:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.3/lib/webrick_server.rb:60:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.3/lib/commands/servers/webrick.rb:66
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.3/lib/active_support/dependencies.rb:153:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.3/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.3/lib/active_support/dependencies.rb:153:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.3/lib/commands/server.rb:49
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3
app/models/card_sound.rb:5:in `file='
app/models/card.rb:13:in `sound_file='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2589:in `send'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2589:in `attributes='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2585:in `each'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2585:in `attributes='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2285:in `initialize'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/reflection.rb:157:in `new'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/reflection.rb:157:in `build_association'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/associations/association_collection.rb:413:in `build_record'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/associations/association_collection.rb:98:in `build'
app/models/deck.rb:10:in `card_attributes='
app/models/deck.rb:8:in `each'
app/models/deck.rb:8:in `card_attributes='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2589:in `send'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2589:in `attributes='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2585:in `each'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2585:in `attributes='
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/base.rb:2471:in `update_attributes'
app/controllers/decks_controller.rb:46:in `update'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/mime_responds.rb:106:in `call'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/mime_responds.rb:106:in `respond_to'
app/controllers/decks_controller.rb:45:in `update'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/base.rb:1256:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/base.rb:1256:in `perform_action_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/filters.rb:617:in `call_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/rescue.rb:136:in `perform_action_without_caching'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/caching/sql_cache.rb:13:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.2.3/lib/active_record/query_cache.rb:8:in `cache'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/caching/sql_cache.rb:12:in `perform_action'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/base.rb:524:in `send'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/base.rb:524:in `process_without_filters'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/filters.rb:606:in `process_without_session_management_support'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/session_management.rb:134:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/base.rb:392:in `process'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:184:in `handle_request'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:112:in `dispatch_unlocked'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:125:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:124:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:124:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:134:in `dispatch_cgi'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.3/lib/action_controller/dispatcher.rb:41:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.3/lib/webrick_server.rb:103:in `handle_dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.3/lib/webrick_server.rb:74:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:37:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.3/lib/webrick_server.rb:60:in `dispatch'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.3/lib/commands/servers/webrick.rb:66
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.3/lib/active_support/dependencies.rb:153:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.3/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.3/lib/active_support/dependencies.rb:153:in `require'
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.3/lib/commands/server.rb:49
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3
Request
Parameters:
{"deck"=>{"name"=>"Ben's Huge Deck",
"share"=>"1",
"card_attributes"=>[{"back"=>"Bar",
"front"=>"Foo",
"sound_file"=>"",
"should_destroy"=>"",
"id"=>"160"},
{"back"=>"Qup",
"front"=>"Baz",
"sound_file"=>"",
"should_destroy"=>"",
"id"=>"161"},
{"back"=>"Fram",
"front"=>"Quz",
"sound_file"=>"",
"should_destroy"=>"",
"id"=>"162"},
{"back"=>"Clop",
"front"=>"Trop",
"sound_file"=>"07 Sweet Pea.m4a"}]},
"commit"=>"Update",
"_method"=>"put",
"authenticity_token"=>"49159b1fede84c07321c91e907011a6e71e1aee4",
"id"=>"30"}
Show session dump
---
user_credentials: 5d85fde7ea6d1b57aa8f7df680146d4ac93c98d88a8cba8c51e935b1bf268d6022736722ccf9290104ec50925ff3594767699d9e717229dec7413eefa9be1352
:quiz: !ruby/object:Quiz
deck: !ruby/object:Deck
attributes:
share: t
name: Ben's Huge Deck
created_at: 2010-04-16 16:00:11
updated_at: 2010-04-16 16:00:11
id: "30"
user_id: "5"
attributes_cache: {}
cards:
- !ruby/object:Card
attributes:
back: Bar
created_at: 2010-04-16 16:00:11
front: Foo
updated_at: 2010-04-16 16:00:11
card_sound_id:
id: "160"
deck_id: "30"
attributes_cache: {}
- !ruby/object:Card
attributes:
back: Qup
created_at: 2010-04-16 16:00:11
front: Baz
updated_at: 2010-04-16 16:00:11
card_sound_id:
id: "161"
deck_id: "30"
attributes_cache: {}
user_credentials_id: 5
flash: !map:ActionController::Flash::FlashHash {}
Response
Headers:
{"Content-Type"=>"",
"cookie"=>[],
"Cache-Control"=>"no-cache"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment