OK, I'll probably need help, I'm doing a bit of testing now and just
got this error:
500 error. I was trying to delete a product from the admin products
page. Is there a simple solution?
Thanks,
2012-01-12T23:08:39+00:00 app[web.1]: Processing
Admin::ProductsController#destroy (for 199.188.194.106 at 2012-01-12
15:08:39) [DELETE]
2012-01-12T23:08:39+00:00 app[web.1]: Parameters:
{"action"=>"destroy", "_method"=>"delete", "id"=>"6",
"controller"=>"admin/products"}
2012-01-12T23:08:39+00:00 app[web.1]:
2012-01-12T23:08:39+00:00 app[web.1]: ActiveRecord::StatementInvalid
(PGError: ERROR: update or delete on table "products" violates
foreign key constraint "line_items_ibfk_product_id" on table
"line_items"
2012-01-12T23:08:39+00:00 app[web.1]: DETAIL: Key (id)=(6) is still
referenced from table "line_items".
2012-01-12T23:08:39+00:00 app[web.1]: : DELETE FROM "products" WHERE
"id" = 6):
2012-01-12T23:08:39+00:00 app[web.1]: app/controllers/admin/
products_controller.rb:76:in `destroy'
2012-01-12T23:08:39+00:00 app[web.1]: /home/heroku_rack/lib/
last_access.rb:15:in `call'
2012-01-12T23:08:39+00:00 app[web.1]: /home/heroku_rack/lib/
date_header.rb:14:in `call'
2012-01-12T23:08:39+00:00 app[web.1]: /home/heroku_rack/lib/
static_assets.rb:9:in `call'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/lib/thin/connection.rb:76:in `pre_process'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/lib/thin/connection.rb:74:in `catch'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/lib/thin/connection.rb:74:in `pre_process'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/lib/thin/connection.rb:57:in `process'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/lib/thin/connection.rb:42:in `receive_data'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/lib/thin/backends/base.rb:57:in `start'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/lib/thin/server.rb:156:in `start'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/lib/thin/controllers/controller.rb:80:in `start'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/lib/thin/runner.rb:177:in `send'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/lib/thin/runner.rb:177:in `run_command'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/lib/thin/runner.rb:143:in `run!'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/lib/ruby/gems/
1.8/gems/thin-1.2.6/bin/thin:6
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/bin/thin:19:in
`load'
2012-01-12T23:08:39+00:00 app[web.1]: /usr/ruby1.8.7/bin/thin:19
2012-01-12T23:08:39+00:00 app[web.1]:
2012-01-12T23:08:39+00:00 app[web.1]:
2012-01-12T23:08:39+00:00 app[web.1]: Rendering /app/public/500.html
(500 Internal Server Error)
2012-01-12T23:08:39+00:00 heroku[router]: POST
store.cocoatech.com/
admin/products/6 dyno=web.1 queue=0 wait=0ms service=316ms status=500
bytes=807