'缺少必需:桶选项'在S3回形针轨道开发中

时间:2014-06-27 19:45:24

标签: ruby-on-rails-4 amazon-s3 paperclip

我按照此链接中的说明操作:https://devcenter.heroku.com/articles/paperclip-s3

我收到以下错误消息:

ActionView::Template::Error (missing required :bucket option):

它指向了这一行:

<%= image_tag company.profile_image.url %>

这些是我当前的文件

env.rb:

ENV['S3_BUCKET_NAME'] = 'goodlifecompanyimages'
ENV['AWS_ACCESS_KEY_ID'] = 'XXX'
ENV['AWS_SECRET_ACCESS_KEY'] = 'XXX'

development.rb:

 Paperclip.options[:command_path] = "/usr/local/bin/"

  config.paperclip_defaults = {
  :storage => :s3,
  :s3_credentials => {
    :bucket => ENV['S3_BUCKET_NAME'],
    :access_key_id => ENV['AWS_ACCESS_KEY_ID'],
    :secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']
    }
  }

谢谢!

0 个答案:

没有答案