ruby-on-rails Seahorse::Client::NetworkingError while uploading file to digitalocean space

k4aesqcs  于 2023-05-19  发布在  Ruby
关注(0)|答案(1)|浏览(176)

我正在学习How To Use ActiveStorage in Rails 6 with DigitalOcean Spaces教程,在设置DigitalOcean Space并尝试上传图像后,出现以下错误

Seahorse::Client::NetworkingError (SSL_connect returned=1 errno=0 state=error: certificate verify failed (unspecified certificate verification error))

我在M1芯片上的macOS 13.0上运行ruby 2.7.1的应用程序。ruby已使用以下选项编译

RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)"
axzmvihb

axzmvihb1#

原来问题是存储配置中的存储桶名称不正确。bucket应该与端点jsut相同,但不包含https://部分

digitalocean:
  endpoint: https://bucket-name.region.digitaloceanspaces.com
  bucket: bucket-name.region.digitaloceanspaces.com

相关问题