使用AWS S3,Carrierwave,fog和Rails 4上传文件时出错

时间:2015-11-22 09:25:56

标签: ruby-on-rails amazon-s3 carrierwave fog

我花了越来越多的时间在这里叹息 ..对不起家伙,并提前感谢所有的帮助。

尝试将文件上传到AWS-S3时出现初始错误:

Excon::Errors::SocketError - Unable to verify certificate, please set `Excon.defaults[:ssl_ca_path] = path_to_certs`, `ENV['SSL_CERT_DIR'] = path_to_certs`, `Excon.defaults[:ssl_ca_file] = path_to_file`, `ENV['SSL_CERT_FILE'] = path_to_file`, `Excon.defaults[:ssl_verify_callback] = callback` (see OpenSSL::SSL::SSLContext#verify_callback), or `Excon.defaults[:ssl_verify_peer] = false` (less secure).:

了解其中的一部分,但不知道如何完全修复它。在做brew doctor时没有出现任何错误。不知怎的,我不再收到错误,但我仍然无法上传文件。

有什么建议吗?提前致谢

追踪:

Started PATCH "/users/1" for ::1 at 2015-11-22 14:12:04 +0100
Processing by UsersController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "user"=>{"username"=>"admin", "email"=>"admin@example.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]", "avatar"=>#<ActionDispatch::Http::UploadedFile:0x007fbaaa4ab4d0 @tempfile=#<Tempfile:/var/folders/h8/bbzt6hw57219gh1s5kzg1v8w0000gn/T/RackMultipart20151122-85005-i377dd.gif>, @original_filename="money.gif", @content_type="image/gif", @headers="Content-Disposition: form-data; name=\"user[avatar]\"; filename=\"money.gif\"\r\nContent-Type: image/gif\r\n">, "avatar_cache"=>""}, "commit"=>"Upload pic", "id"=>"1"}
  User Load (0.2ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1  [["id", 1]]
  User Load (0.1ms)  SELECT  "users".* FROM "users" WHERE "users"."remember_me_token" = ? LIMIT 1  [["remember_me_token", "FILTERED"]]
   (0.1ms)  begin transaction
  User Exists (0.2ms)  SELECT  1 AS one FROM "users" WHERE ("users"."username" = 'admin' AND "users"."id" != 1) LIMIT 1
   (0.1ms)  rollback transaction
  Rendered users/_form.html.erb (7.6ms)

App link

0 个答案:

没有答案