我无法理解发生了什么。几天前我的生产服务器很好,一切都很好。然后需要进行一些更改(生产数据库重置),之后,我的应用程序的图像上传功能开始响应错误500,但仅在生产中。在开发中,上传发生时没有错误,但生产不能再这样做了,我不知道为什么。
以下是图片上传的 development.log :
Started POST "/smokes" for 127.0.0.1 at 2013-11-25 21:45:40 -0300
Processing by SmokesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"bKKTUuAYPvKQRJJ+t8PgPqBImrI/XTfPo030rxb1HYA=", "smoke"=>{"latitude"=>"55.677584411089505", "longitude"=>"46.23046875", "image"=>#<ActionDispatch::Http::UploadedFile:0x007f8a6365c918 @original_filename="138431703817.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"smoke[image]\"; filename=\"138431703817.png\"\r\nContent-Type: image/png\r\n", @tempfile=#<Tempfile:/var/folders/qh/j7fp47qn3gn2rbnqyccr5mr80000gn/T/RackMultipart20131125-11066-1i15nwb>>, "description"=>""}}
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
fschuindt
(0.2ms) BEGIN
SQL (3.6ms) INSERT INTO "smokes" ("created_at", "description", "image", "latitude", "longitude", "picture_content_type", "picture_file_name", "picture_file_size", "picture_updated_at", "updated_at", "user_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["created_at", Tue, 26 Nov 2013 00:45:42 UTC +00:00], ["description", ""], ["image", "_1f47882dc38d1eb143ee.jpg"], ["latitude", 55.677584411089505], ["longitude", 46.23046875], ["picture_content_type", nil], ["picture_file_name", nil], ["picture_file_size", nil], ["picture_updated_at", nil], ["updated_at", Tue, 26 Nov 2013 00:45:42 UTC +00:00], ["user_id", nil]]
SQL (3.8ms) INSERT INTO "versions" ("created_at", "event", "ip", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 26 Nov 2013 00:45:42 UTC +00:00], ["event", "create"], ["ip", "127.0.0.1"], ["item_id", 12], ["item_type", "Smoke"], ["object", nil], ["whodunnit", #<User id: 1, name: "That's a test :) LOL", email: "f.schuindtcs@gmail.com", password_digest: nil, created_at: "2013-10-11 00:35:06", updated_at: "2013-11-24 18:42:33", external_provider: true, avatar_setup: nil>]]
(2.3ms) COMMIT
(0.3ms) BEGIN
Smoke Load (0.7ms) SELECT "smokes".* FROM "smokes" WHERE "smokes"."id" = $1 LIMIT 1 [["id", 12]]
(0.6ms) UPDATE "smokes" SET "user_id" = 1, "image" = '12_1f47882dc38d1eb143ee.jpg', "updated_at" = '2013-11-26 00:46:20.883785' WHERE "smokes"."id" = 12
SQL (0.5ms) INSERT INTO "versions" ("created_at", "event", "ip", "item_id", "item_type", "object", "whodunnit") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 26 Nov 2013 00:46:20 UTC +00:00], ["event", "update"], ["ip", "127.0.0.1"], ["item_id", 12], ["item_type", "Smoke"], ["object", "---\nlatitude: 55.677584411089505\nlongitude: 46.23046875\ndescription: ''\ncreated_at: 2013-11-26 00:45:42.246820000 Z\nupdated_at: 2013-11-26 00:45:42.246820000 Z\npicture_file_name: \npicture_content_type: \npicture_file_size: \npicture_updated_at: \nuser_id: \nimage: _1f47882dc38d1eb143ee.jpg\nid: 12\n"], ["whodunnit", #<User id: 1, name: "That's a test :) LOL", email: "f.schuindtcs@gmail.com", password_digest: nil, created_at: "2013-10-11 00:35:06", updated_at: "2013-11-24 18:42:33", external_provider: true, avatar_setup: nil>]]
(1.7ms) COMMIT
Redirected to http://weedmap.dev/smokes/12
Completed 302 Found in 45114ms (ActiveRecord: 15.2ms)
这是我的 production.log 上传图片,请注意错误没有解释,只是渲染错误:
Started POST "/smokes" for 189.71.176.229 at 2013-11-26 00:42:33 +0000
Processing by SmokesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"YMH9OlQFPnd9fubk8dqVNeS6/xwyTU+/xbMegPIBeUs=", "smoke"=>{"latitude"=>"58.539594766640484", "longitude"=>"42.1875", "image"=>#<ActionDispatch::Http::UploadedFile:0x90f52cc @original_filename="aruana.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"smoke[image]\"; filename=\"aruana.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<Tempfile:/tmp/RackMultipart20131126-25516-v3ycvc>>, "description"=>"Wut"}}
Rendered pages/_bottom.html.erb (0.7ms)
Rendered errors/error_500.html.erb within layouts/application (3.0ms)
Rendered layouts/_head.html.erb (2.0ms)
Completed 500 Internal Server Error in 4710ms (Views: 8.4ms | ActiveRecord: 3.7ms)
图像是一样的,一切都是一样的。 我正在考虑Rails / tmp的权限,但即使在“sudo chmod 777 / tmp”LOL之后也会出现。
我的nginx error.log也没有告诉它。 我该怎么办?
在哪里寻找线索?
额外信息:我的应用程序在Amazon S3中存储图像(即使在开发中);它使用Carrierwave;
修改
正如diego.greyrobot所提到的,我使用了救援例外,看起来我找到了一个很大的线索。我还不明白,但我会一直试图弄清楚发生了什么。
检查控制器中的代码......
smokes_controller.rb :
def create
@user = current_user
@smoke = Smoke.new(params[:smoke])
logger.debug ENV['USER']
begin
if @smoke.save
@user.smokes << @smoke
redirect_to @smoke
else
render 'new'
end
rescue Exception => e
puts e.class
puts e.message
puts e.backtrace
end
end
回答大异常消息:
Excon::Errors::MovedPermanently
Expected(200) <=> Actual(301 Moved Permanently)
response => #<Excon::Response:0x007f9bed62c1a0 @data={:body=>"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>PermanentRedirect</Code><Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message><RequestId>C463040B8E840FC4</RequestId><Bucket>weedsquare-pro</Bucket><HostId>TRnfX/oK0un+To6/2W6JWi8gBe4YSvZfW3nSqDCLCzfofhZbOnt/RXAb1U8G2OdO</HostId><Endpoint>s3.amazonaws.com</Endpoint></Error>", :headers=>{"x-amz-request-id"=>"C463040B8E840FC4", "x-amz-id-2"=>"TRnfX/oK0un+To6/2W6JWi8gBe4YSvZfW3nSqDCLCzfofhZbOnt/RXAb1U8G2OdO", "Content-Type"=>"application/xml", "Transfer-Encoding"=>"chunked", "Date"=>"Tue, 26 Nov 2013 05:34:59 GMT", "Connection"=>"close", "Server"=>"AmazonS3"}, :status=>301, :remote_ip=>"204.246.162.224"}, @body="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>PermanentRedirect</Code><Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message><RequestId>C463040B8E840FC4</RequestId><Bucket>weedsquare-pro</Bucket><HostId>TRnfX/oK0un+To6/2W6JWi8gBe4YSvZfW3nSqDCLCzfofhZbOnt/RXAb1U8G2OdO</HostId><Endpoint>s3.amazonaws.com</Endpoint></Error>", @headers={"x-amz-request-id"=>"C463040B8E840FC4", "x-amz-id-2"=>"TRnfX/oK0un+To6/2W6JWi8gBe4YSvZfW3nSqDCLCzfofhZbOnt/RXAb1U8G2OdO", "Content-Type"=>"application/xml", "Transfer-Encoding"=>"chunked", "Date"=>"Tue, 26 Nov 2013 05:34:59 GMT", "Connection"=>"close", "Server"=>"AmazonS3"}, @status=301, @remote_ip="204.246.162.224">
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/middlewares/expects.rb:6:in `response_call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/connection.rb:353:in `response'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/connection.rb:247:in `request'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/middlewares/idempotent.rb:12:in `error_call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/connection.rb:260:in `rescue in request'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/connection.rb:220:in `request'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/middlewares/idempotent.rb:12:in `error_call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/connection.rb:260:in `rescue in request'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/connection.rb:220:in `request'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/middlewares/idempotent.rb:12:in `error_call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/middlewares/base.rb:10:in `error_call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/connection.rb:260:in `rescue in request'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/excon-0.23.0/lib/excon/connection.rb:220:in `request'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.12.1/lib/fog/core/connection.rb:25:in `request'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.12.1/lib/fog/aws/storage.rb:506:in `request'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.12.1/lib/fog/aws/requests/storage/put_object.rb:32:in `put_object'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.12.1/lib/fog/aws/models/storage/file.rb:211:in `save'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/fog-1.12.1/lib/fog/core/collection.rb:52:in `create'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/carrierwave-0.8.0/lib/carrierwave/storage/fog.rb:258:in `store'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/carrierwave-0.8.0/lib/carrierwave/storage/fog.rb:79:in `store!'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/carrierwave-0.8.0/lib/carrierwave/uploader/store.rb:59:in `block in store!'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/carrierwave-0.8.0/lib/carrierwave/uploader/callbacks.rb:17:in `with_callbacks'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/carrierwave-0.8.0/lib/carrierwave/uploader/store.rb:58:in `store!'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/carrierwave-0.8.0/lib/carrierwave/mount.rb:371:in `store!'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/carrierwave-0.8.0/lib/carrierwave/mount.rb:223:in `store_image!'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:438:in `_run__1809318562336863559__save__1439115245121770263__callbacks'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/callbacks.rb:264:in `create_or_update'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/persistence.rb:84:in `save'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/validations.rb:50:in `save'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/attribute_methods/dirty.rb:22:in `save'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/transactions.rb:259:in `block (2 levels) in save'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/transactions.rb:259:in `block in save'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/transactions.rb:258:in `save'
/Users/fschuindt/Documents/weedmap/app/controllers/smokes_controller.rb:24:in `create'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:167:in `process_action'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/rendering.rb:10:in `process_action'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:480:in `_run__2082980582115641481__process_action__2063028963365509982__callbacks'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:17:in `process_action'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/rescue.rb:29:in `process_action'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in `block in instrument'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in `instrument'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:121:in `process'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:45:in `process'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal.rb:203:in `dispatch'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_controller/metal.rb:246:in `block in action'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:36:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:612:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/omniauth-1.1.3/lib/omniauth/strategy.rb:177:in `call!'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/omniauth-1.1.3/lib/omniauth/strategy.rb:157:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/omniauth-1.1.3/lib/omniauth/strategy.rb:177:in `call!'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/omniauth-1.1.3/lib/omniauth/strategy.rb:157:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/omniauth-1.1.3/lib/omniauth/builder.rb:48:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/middleware/head.rb:14:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/middleware/flash.rb:242:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/query_cache.rb:64:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `_run__222776516211350810__call__1439115245121770263__callbacks'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in `__run_callback'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/sendfile.rb:102:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.13/lib/rails/rack/logger.rb:32:in `call_app'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:in `block in call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/tagged_logging.rb:22:in `tagged'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-3.2.13/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-3.2.13/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.13/lib/rails/engine.rb:479:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.13/lib/rails/application.rb:223:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/content_length.rb:14:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.13/lib/rails/rack/log_tailer.rb:17:in `call'
/Users/fschuindt/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.4.5/lib/rack/handler/webrick.rb:59:in `service'
/Users/fschuindt/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/Users/fschuindt/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/Users/fschuindt/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
Started POST "/smokes" for 127.0.0.1 at 2013-11-26 02:34:52 -0300
Processing by SmokesController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"FjLDOwzP/wuus5u90qsOjyxOiHghmKuJnnx/ThVORrg=", "smoke"=>{"latitude"=>"52.696361078274485", "longitude"=>"48.33984375", "image"=>#<ActionDispatch::Http::UploadedFile:0x007f9bf06c2030 @original_filename="136596215039.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"smoke[image]\"; filename=\"136596215039.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<Tempfile:/var/folders/qh/j7fp47qn3gn2rbnqyccr5mr80000gn/T/RackMultipart20131126-12646-1dalk6q>>, "description"=>"What?"}}
Rendered pages/_bottom.html.erb (0.8ms)
Rendered errors/error_500.html.erb within layouts/application (1.9ms)
Rendered layouts/_head.html.erb (1.5ms)
Completed 500 Internal Server Error in 7303ms (Views: 6.7ms | ActiveRecord: 0.0ms)
Started GET "/assets/sad.jpg" for 127.0.0.1 at 2013-11-26 02:35:00 -0300
Served asset /sad.jpg - 304 Not Modified (2ms)
答案 0 :(得分:0)
其实我的问题出现在carrierwave.rb中,我正在设置一个区域到Amazon S3“:region =&gt;'us-west-1'”。出于某种原因,这导致了所有的麻烦,只是让它默认选择区域,一切都会很好。