Hi,
The error below is happening when saving several related objects (in this
case a purchase order with products along with a shipping and a billing
address, and a credit card) to the database so it involves multiple inserts.
The line where it dies reads: order.save
I''ve had no luck debugging it.
I''d sincerely appreciate any feedback.
Sergio
> A NoMethodError occurred in payment#submit:
>
> undefined method `clear'' for nil:NilClass
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/valida
> tions.rb:714:in `valid_without_callbacks''
>
> -------------------------------
> Request:
> -------------------------------
>
> * URL: http://domain.com/checkout/payment/submit
> * Parameters: {"action"=>"submit",
> "checkout/payment/submit.html/payment/submit"=>nil,
> "controller"=>"checkout/payment"}
> * Rails root: /home/rails/project/
>
> -------------------------------
> Environment:
> -------------------------------
>
> * DOCUMENT_ROOT : /home/rails/project/public/
> * FCGI_ROLE : RESPONDER
> * GATEWAY_INTERFACE : CGI/1.1
> * HTTP_ACCEPT :
>
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.
> 8,image/png,*/*;q=0.5
> * HTTP_ACCEPT_CHARSET : ISO-8859-1,utf-8;q=0.7,*;q=0.7
> * HTTP_ACCEPT_ENCODING : gzip,deflate
> * HTTP_ACCEPT_LANGUAGE : en-us,en;q=0.5
> * HTTP_CONNECTION : keep-alive
> * HTTP_COOKIE :
> * HTTP_HOST : domain.com
> * HTTP_KEEP_ALIVE : 300
> * HTTP_REFERER :
> http://domain.com/checkout/payment/confirmation
> * HTTP_USER_AGENT : Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O;
> en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
> * PATH : /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
> * QUERY_STRING : checkout/payment/submit.html/payment/submit
> * REDIRECT_QUERY_STRING: checkout/payment/submit.html/payment/submit
> * REDIRECT_STATUS : 200
> * REDIRECT_UNIQUE_ID : Ok5JlUgDjTQAAFVg-2kAAAAG
> * REDIRECT_URL : /checkout/payment/submit
> * REMOTE_ADDR : 64.55.34.21
> * REMOTE_PORT : 52125
> * REQUEST_METHOD : GET
> * REQUEST_URI : /checkout/payment/submit
> * SCRIPT_FILENAME : /home/rails/project/public/dispatch.fcgi
> * SCRIPT_NAME : /dispatch.fcgi
> * SERVER_ADDR : 192.168.1.52
> * SERVER_PORT : 80
> * SERVER_PROTOCOL : HTTP/1.1
> * SERVER_SIGNATURE : <address>Apache/2.0.46 (Red Hat) Server at
> domain.com Port 80</address>
> * SERVER_SOFTWARE : Apache/2.0.46 (Red Hat)
> * UNIQUE_ID : Ok5JlUgDjTQAAFVg-2kAAAAG
>
> -------------------------------
> Backtrace:
> -------------------------------
>
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/valida
> tions.rb:714:in `valid_without_callbacks''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/callba
> cks.rb:306:in `valid?''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/valida
> tions.rb:686:in `save_without_transactions''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/transa
> ctions.rb:126:in `save''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/transa
> ctions.rb:126:in `transaction''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/transa
> ctions.rb:91:in `transaction''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/transa
> ctions.rb:118:in `transaction''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/transa
> ctions.rb:126:in `save''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associ
> ations/association_proxy.rb:75:in `send''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/associ
> ations/association_proxy.rb:75:in `method_missing''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/callba
> cks.rb:338:in `callback''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/callba
> cks.rb:335:in `callback''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/callba
> cks.rb:330:in `each''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/callba
> cks.rb:330:in `callback''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/callba
> cks.rb:250:in `create_or_update''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/base.r
> b:1231:in `save_without_validation''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/valida
> tions.rb:687:in `save_without_transactions''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/transa
> ctions.rb:126:in `save''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/transa
> ctions.rb:126:in `transaction''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/transa
> ctions.rb:91:in `transaction''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/transa
> ctions.rb:118:in `transaction''
>
>
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/active_record/transa
> ctions.rb:126:in `save''
> [RAILS_ROOT]/app/controllers/checkout/payment_controller.rb:66:in
`submit''
>
>
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/base
> .rb:841:in `send''
>
>
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/base
> .rb:841:in `perform_action_without_filters''
>
>
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/filt
> ers.rb:332:in `perform_action_without_benchmark''
>
>
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/benc
> hmarking.rb:69:in `perform_action_without_rescue''
>
>
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/benc
> hmarking.rb:69:in `measure''
>
>
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/benc
> hmarking.rb:69:in `perform_action_without_rescue''
>
>
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/resc
> ue.rb:82:in `perform_action''
>
>
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/base
> .rb:365:in `send''
>
>
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/base
> .rb:365:in `process_without_session_management_support''
>
>
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/sess
> ion_management.rb:116:in `process''
> /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/dispatcher.rb:38:in
> `dispatch''
> /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/fcgi_handler.rb:141:in
> `process_request''
> /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/fcgi_handler.rb:53:in
> `process!''
> /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/fcgi_handler.rb:52:in
> `each_cgi''
> /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/fcgi.rb:597:in
`each''
> /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/fcgi.rb:597:in
`each_cgi''
> /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/fcgi_handler.rb:52:in
> `process!''
> /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/fcgi_handler.rb:22:in
> `process!''
> [RAILS_ROOT]/public/dispatch.fcgi:24
>