【问题标题】:Errno::ENOENT (No such file or directory @ rb_sysopen - aws.yml)Errno::ENOENT(没有这样的文件或目录 @ rb_sysopen - aws.yml)
【发布时间】:2018-05-01 16:10:24
【问题描述】:

站点部署在 aws elastic beantalk 中

aws.yml

 production:
  access_key_id: 123333231331....
  secret_access_key: 12212dddddd........

生产.rb

  config.paperclip_defaults = {
  :storage => :s3,
  :preserve_files => true,
  :s3_credentials => 'aws.yml',
  :s3_region => 'ap-south-1',
  :s3_host_name => 's3.ap-south-1.amazonaws.com',
  :bucket => 'xxxxxx'
}

我还在 s3 存储桶中授予公共访问权限。

anyone: read write

宝石...

gem 'aws-sdk', '~> 2.10', '>= 2.10.85'

config 文件夹中的 aws.yml 文件夹 -- config/aws.yml

【问题讨论】:

    标签: ruby-on-rails ruby amazon-web-services amazon-s3 aws-ebs


    【解决方案1】:

    看起来应用程序没有找到您的 S3 凭据文件。在您的production.rb 中,尝试为其提供文件的完整路径:

    :s3_credentials => "#{Rails.root}/config/aws.yml"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-07-09
      • 2018-05-01
      • 2018-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多