DigitalOcean Spaces + Refile无效

时间:2018-01-06 22:05:46

标签: ruby-on-rails amazon-web-services amazon-s3 digital-ocean

我正在尝试使用 refile / s3 集成Spaces,因为我认为这将是最简单地集成Spaces的最佳方法。但我遇到了一些错误。第一个错误如下:

Aws::Errors::NoSuchEndpointError (Encountered a `SocketError` while attempting to connect to: 
  https://bluebird-docs-feature.s3.nyc3.amazonaws.com/cache/5057974609d11435f333e99b1f2896dae159fd4c978a2710a945caedb2e3

这是我的 config / initializers / refile.rb 文件:

require "refile/s3"

aws = {
  access_key_id: Rails.application.secrets.digitalocean_spaces_key,
  secret_access_key: Rails.application.secrets.digitalocean_spaces_secret,
  region: "nyc3",
  bucket: Rails.application.secrets.digitalocean_spaces_bucket
      }

  Refile.cache = Refile::S3.new(prefix: "cache", **aws)
  Refile.store = Refile::S3.new(prefix: "store", **aws)

我的 secrets.yml 档案:

digitalocean_spaces_key: XYZ
digitalocean_spaces_secret: XYZ
digitalocean_spaces_bucket: XYZ

我将这些宝石包括在内以供反映:

gem "refile-s3"
gem 'refile', github: 'refile/refile', require: 'refile/rails'
gem 'refile-mini_magick', github: 'refile/refile-mini_magick'
gem 'sinatra', github: 'sinatra/sinatra', branch: 'master'

我没有安装任何其他AWS或DigitalOcean宝石。

提前谢谢你。如果您需要更多信息,请询问!

0 个答案:

没有答案