Heroku中的错误:我们很抱歉,但出了点问题

时间:2016-01-22 10:19:13

标签: ruby-on-rails ruby-on-rails-4 heroku

我正在尝试使用paperclip gem上传图片。 在localhost:3000所做的一切。 但是当我想要EditCreate手机(我的手机有图像)时,我会推送到Heroku,它不起作用!

日志:

2016-01-22T09:57:01.450042+00:00 app[web.1]:   User Load (1.8ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 1]]
2016-01-22T09:57:01.456733+00:00 app[web.1]:   Rendered users/show.html.erb within layouts/application (4.7ms)
2016-01-22T09:57:01.460946+00:00 app[web.1]: Completed 200 OK in 16ms (Views: 6.7ms | ActiveRecord: 5.2ms)
2016-01-22T09:57:02.686621+00:00 heroku[router]: at=info method=GET path="/products/1" host=boiling-bayou-5793.herokuapp.com request_id=a57580eb-783d-4c0d-858f-028889363e31 fwd="42.113.157.40" dyno=web.1 connect=0ms service=25ms status=200 bytes=5001
2016-01-22T09:57:02.663085+00:00 app[web.1]: Started GET "/products/1" for 42.113.157.40 at 2016-01-22 09:57:02 +0000
2016-01-22T09:57:02.673205+00:00 app[web.1]:   User Load (1.7ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 1]]
2016-01-22T09:57:02.684460+00:00 app[web.1]: Completed 200 OK in 17ms (Views: 8.1ms | ActiveRecord: 6.8ms)
2016-01-22T09:57:02.679163+00:00 app[web.1]:   Rendered products/show.html.erb within layouts/application (7.8ms)
2016-01-22T09:57:02.667608+00:00 app[web.1]: Processing by ProductsController#show as HTML
2016-01-22T09:57:02.667613+00:00 app[web.1]:   Parameters: {"id"=>"1"}
2016-01-22T09:57:02.670193+00:00 app[web.1]:   Product Load (1.8ms)  SELECT  "products".* FROM "products" WHERE "products"."id" = $1 LIMIT 1  [["id", 1]]
2016-01-22T09:57:02.675783+00:00 app[web.1]:   Phone Load (1.7ms)  SELECT "phones".* FROM "phones" WHERE "phones"."product_id" = $1  [["product_id", 1]]
2016-01-22T09:57:02.682277+00:00 app[web.1]:   Product Load (1.7ms)  SELECT "products".* FROM "products"
2016-01-22T09:57:03.016682+00:00 heroku[router]: at=info method=GET path="/images/thumb/missing.png" host=boiling-bayou-5793.herokuapp.com request_id=c7ec8f4f-dacb-4e15-8499-07c58d4bec79 fwd="42.113.157.40" dyno=web.1 connect=1ms service=7ms status=404 bytes=1829
2016-01-22T09:57:03.011589+00:00 app[web.1]: Started GET "/images/thumb/missing.png" for 42.113.157.40 at 2016-01-22 09:57:03 +0000
2016-01-22T09:57:03.015061+00:00 app[web.1]: 
2016-01-22T09:57:03.015063+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/images/thumb/missing.png"):
2016-01-22T09:57:03.015064+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2016-01-22T09:57:03.015065+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2016-01-22T09:57:03.015065+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:38:in `call_app'
2016-01-22T09:57:03.015066+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `block in call'
2016-01-22T09:57:03.015066+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2016-01-22T09:57:03.015067+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:26:in `tagged'
2016-01-22T09:57:03.015068+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `tagged'
2016-01-22T09:57:03.015068+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `call'
2016-01-22T09:57:03.015069+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2016-01-22T09:57:03.015069+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
2016-01-22T09:57:03.015070+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
2016-01-22T09:57:03.015071+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2016-01-22T09:57:03.015071+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/static.rb:116:in `call'
2016-01-22T09:57:03.015072+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
2016-01-22T09:57:03.015072+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:518:in `call'
2016-01-22T09:57:03.015073+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/application.rb:165:in `call'
2016-01-22T09:57:03.015073+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
2016-01-22T09:57:03.015074+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
2016-01-22T09:57:03.015074+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
2016-01-22T09:57:03.015074+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2016-01-22T09:57:03.015075+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2016-01-22T09:57:03.015075+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2016-01-22T09:57:03.015076+00:00 app[web.1]: 
2016-01-22T09:57:03.015076+00:00 app[web.1]: 
2016-01-22T09:57:03.971721+00:00 heroku[router]: at=info method=GET path="/products/1/phone/1" host=boiling-bayou-5793.herokuapp.com request_id=1dd79eca-4f52-45b2-83e3-0c483dbde2b5 fwd="42.113.157.40" dyno=web.1 connect=0ms service=25ms status=200 bytes=3343
2016-01-22T09:57:03.950290+00:00 app[web.1]: Processing by PhoneController#show as HTML
2016-01-22T09:57:03.950295+00:00 app[web.1]:   Parameters: {"product_id"=>"1", "id"=>"1"}
2016-01-22T09:57:03.952953+00:00 app[web.1]:   Phone Load (1.8ms)  SELECT  "phones".* FROM "phones" WHERE "phones"."id" = $1 LIMIT 1  [["id", 1]]
2016-01-22T09:57:03.957053+00:00 app[web.1]:   Rendered phone/show.html.erb within layouts/application (3.4ms)
2016-01-22T09:57:03.960975+00:00 app[web.1]: Completed 200 OK in 11ms (Views: 4.2ms | ActiveRecord: 5.2ms)
2016-01-22T09:57:03.947484+00:00 app[web.1]: Started GET "/products/1/phone/1" for 42.113.157.40 at 2016-01-22 09:57:03 +0000
2016-01-22T09:57:03.956595+00:00 app[web.1]:   User Load (1.7ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 1]]
2016-01-22T09:57:03.959978+00:00 app[web.1]:   Product Load (1.7ms)  SELECT "products".* FROM "products"
2016-01-22T09:57:04.285058+00:00 heroku[router]: at=info method=GET path="/images/medium/missing.png" host=boiling-bayou-5793.herokuapp.com request_id=42c7789b-9e85-4218-af7f-cb56c91461aa fwd="42.113.157.40" dyno=web.1 connect=0ms service=7ms status=404 bytes=1829
2016-01-22T09:57:04.280151+00:00 app[web.1]: Started GET "/images/medium/missing.png" for 42.113.157.40 at 2016-01-22 09:57:04 +0000
2016-01-22T09:57:04.283796+00:00 app[web.1]: 
2016-01-22T09:57:04.283814+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/images/medium/missing.png"):
2016-01-22T09:57:04.283816+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2016-01-22T09:57:04.283817+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2016-01-22T09:57:04.283817+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:38:in `call_app'
2016-01-22T09:57:04.283818+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `block in call'
2016-01-22T09:57:04.283819+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2016-01-22T09:57:04.283820+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:26:in `tagged'
2016-01-22T09:57:04.283820+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/tagged_logging.rb:68:in `tagged'
2016-01-22T09:57:04.283821+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/rack/logger.rb:20:in `call'
2016-01-22T09:57:04.283822+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2016-01-22T09:57:04.283822+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
2016-01-22T09:57:04.283823+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
2016-01-22T09:57:04.283825+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.4/lib/action_dispatch/middleware/static.rb:116:in `call'
2016-01-22T09:57:04.283824+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2016-01-22T09:57:04.283826+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
2016-01-22T09:57:04.283827+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/application.rb:165:in `call'
2016-01-22T09:57:04.283826+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:518:in `call'
2016-01-22T09:57:04.283828+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
2016-01-22T09:57:04.283828+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
2016-01-22T09:57:04.283829+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
2016-01-22T09:57:04.283830+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2016-01-22T09:57:04.283830+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2016-01-22T09:57:04.283831+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2016-01-22T09:57:04.283832+00:00 app[web.1]: 
2016-01-22T09:57:04.283832+00:00 app[web.1]: 
2016-01-22T09:57:05.264556+00:00 heroku[router]: at=info method=GET path="/phone/1/edit" host=boiling-bayou-5793.herokuapp.com request_id=586f10ce-91db-45aa-a5be-0d10d06a22ef fwd="42.113.157.40" dyno=web.1 connect=0ms service=24ms status=200 bytes=3422
2016-01-22T09:57:05.241977+00:00 app[web.1]: Started GET "/phone/1/edit" for 42.113.157.40 at 2016-01-22 09:57:05 +0000
2016-01-22T09:57:05.250310+00:00 app[web.1]:   Phone Load (1.8ms)  SELECT  "phones".* FROM "phones" WHERE "phones"."id" = $1 LIMIT 1  [["id", 1]]
2016-01-22T09:57:05.260154+00:00 app[web.1]:   Product Load (1.8ms)  SELECT "products".* FROM "products"
2016-01-22T09:57:05.244950+00:00 app[web.1]: Processing by PhoneController#edit as HTML
2016-01-22T09:57:05.244978+00:00 app[web.1]:   Parameters: {"id"=>"1"}
2016-01-22T09:57:05.247811+00:00 app[web.1]:   User Load (1.8ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 1]]
2016-01-22T09:57:05.256387+00:00 app[web.1]:   Rendered phone/edit.html.erb within layouts/application (4.4ms)
2016-01-22T09:57:05.262166+00:00 app[web.1]: Completed 200 OK in 17ms (Views: 9.5ms | ActiveRecord: 5.3ms)
2016-01-22T09:57:06.656960+00:00 heroku[router]: at=info method=POST path="/phone/1" host=boiling-bayou-5793.herokuapp.com request_id=04208398-405e-4816-acb6-991917ec5b28 fwd="42.113.157.40" dyno=web.1 connect=0ms service=23ms status=500 bytes=1754
2016-01-22T09:57:06.636079+00:00 app[web.1]: Started PATCH "/phone/1" for 42.113.157.40 at 2016-01-22 09:57:06 +0000
2016-01-22T09:57:06.645308+00:00 app[web.1]:   Phone Load (1.9ms)  SELECT  "phones".* FROM "phones" WHERE "phones"."id" = $1 LIMIT 1  [["id", 1]]
2016-01-22T09:57:06.651432+00:00 app[web.1]:    (1.7ms)  ROLLBACK
2016-01-22T09:57:06.655494+00:00 app[web.1]: 
2016-01-22T09:57:06.655495+00:00 app[web.1]: NoMethodError (undefined method `image_content_type' for #<Phone:0x007f581c3ff180>):
2016-01-22T09:57:06.655496+00:00 app[web.1]:   app/controllers/phone_controller.rb:29:in `update'
2016-01-22T09:57:06.655497+00:00 app[web.1]: 
2016-01-22T09:57:06.655497+00:00 app[web.1]: 
2016-01-22T09:57:06.639459+00:00 app[web.1]: Processing by PhoneController#update as HTML
2016-01-22T09:57:06.639562+00:00 app[web.1]:   Parameters: {"utf8"=>"✓", "authenticity_token"=>"MPzPxtUNxLt3EhCyaRSoaEvAvFtqN093hVaVOCs3ig3Ayg6quc6oia2flAnzhAjTYbjh+WxM4t3LhdycX+GTbg==", "phone"=>{"name"=>"Lumia 520", "price"=>"11999"}, "commit"=>"Edit", "id"=>"1"}
2016-01-22T09:57:06.642894+00:00 app[web.1]:   User Load (2.0ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1  [["id", 1]]
2016-01-22T09:57:06.647700+00:00 app[web.1]:    (1.7ms)  BEGIN
2016-01-22T09:57:06.652822+00:00 app[web.1]: Completed 500 Internal Server Error in 13ms (ActiveRecord: 7.2ms)

0 个答案:

没有答案