rails:1490
From: sono <skymap_sora@y...>
Date: Thu, 10 Aug 2006 11:59:11 +0900 (JST)
Subject: [rails:1490] Re: rails 本の depot アプリケーションに挑戦しています。
Ottiiさん sonoです。ありがとうございます! 書き直してやってみたところ、先ほどのエラーは 出なくなりました。 お恥ずかしい・・。 しかしながら、次のエラーがでました・・。 NoMethodError in StoreController#add_to_cart You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occured while evaluating nil.+ RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/models/cart.rb:12:in `add_product' app/controllers/store_controller.rb:10:in `add_to_cart' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/base.rb:910:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/base.rb:910:in `perform_action_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/benchmarking.rb:69:in `measure' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/rescue.rb:82:in `perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/base.rb:381:in `send' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/base.rb:381:in `process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/filters.rb:377:in `process_without_session_management_support' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/session_management.rb:117:in `process' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/dispatcher.rb:38:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/webrick_server.rb:115:in `handle_dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/webrick_server.rb:81: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:155:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/webrick_server.rb:67:in `dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/commands/servers/webrick.rb:59 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require' /usr/local/lib/ruby/gems/1.8/gems/rails-1.1.4/lib/commands/server.rb:30 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in `require' script/server:3 Request Parameters: {"id"=>"2"} Show session dump --- :cart: !ruby/object:Cart items: - !ruby/object:LineItem attributes: quantity: 1 product_id: 2 unit_price: 50.0 new_record: true product: !ruby/object:Product attributes: image_url: http://a.jp/a.jpeg date_available: 2006-08-06 11:51:00 price: "50.00" title: b id: "2" description: "あ" - !ruby/object:LineItem attributes: quantity: 1 product_id: 2 unit_price: 50.0 new_record: true product: !ruby/object:Product attributes: image_url: http://a.jp/a.jpeg date_available: 2006-08-06 11:51:00 price: "50.00" title: b id: "2" description: "あ" - !ruby/object:LineItem attributes: quantity: 1 product_id: 2 unit_price: 50.0 new_record: true product: !ruby/object:Product attributes: image_url: http://a.jp/a.jpeg date_available: 2006-08-06 11:51:00 price: "50.00" title: b id: "2" description: "あ" tital_price: 0.0 flash: !ruby/hash:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} セッションは動いてるみたいなのですが 何か定義し忘れてるみたい(?)です・・。 > > 署名消すの忘れてた。。。 > 見なかったことにしてくだされorz 了解ですb -- ML: rails@r... 使い方: http://QuickML.com/
1482 2006-08-10 03:34 [skymap_sora@y... ] rails 本の depot アプリケーションに挑戦しています。 1483 2006-08-10 03:40 ┣[ochi@c... ] 1484 2006-08-10 03:45 ┃┗[skymap_sora@y... ] 1486 2006-08-10 03:53 ┃ ┗[ochi@c... ] 1487 2006-08-10 04:07 ┃ ┗[skymap_sora@y... ] 1489 2006-08-10 04:18 ┃ ┗[ochi@c... ] -> 1490 2006-08-10 04:59 ┃ ┗[skymap_sora@y... ] 1491 2006-08-10 05:12 ┃ ┣[ochi@c... ] 1492 2006-08-10 05:38 ┃ ┃┗[skymap_sora@y... ] 1493 2006-08-10 06:04 ┃ ┃ ┗[skymap_sora@y... ] 1495 2006-08-10 06:41 ┃ ┃ ┗[ochi@c... ] 1496 2006-08-10 07:02 ┃ ┃ ┗[ochi@c... ] 1497 2006-08-10 07:24 ┃ ┃ ┗[skymap_sora@y... ] 1498 2006-08-10 07:35 ┃ ┃ ┗[ochi@c... ] 1499 2006-08-10 07:51 ┃ ┃ ┣[skymap_sora@y... ] 1501 2006-08-10 08:01 ┃ ┃ ┃┗[ochi@c... ] 1502 2006-08-10 08:22 ┃ ┃ ┃ ┗[bsdmad@g... ] 1503 2006-08-10 08:41 ┃ ┃ ┃ ┗[skymap_sora@y... ] 1500 2006-08-10 07:56 ┃ ┃ ┗[tyumityumi@g... ] 1504 2006-08-10 09:06 ┃ ┗[yuui.tanaka@n... ] 1505 2006-08-10 09:18 ┃ ┣[ochi@c... ] 1506 2006-08-10 09:41 ┃ ┃┗[yuui.tanaka@n... ] 1507 2006-08-10 09:54 ┃ ┗[skymap_sora@y... ] 1485 2006-08-10 03:51 ┗[bsdmad@g... ] 1488 2006-08-10 04:15 ┗[skymap_sora@y... ]