AWS S3, Paperclip missing required :bucket option

后端 未结 5 594
囚心锁ツ
囚心锁ツ 2020-12-06 05:09

I\'m trying to use Paperclip and SWS S3 on Heroku to let users upload images.

I do not have my credentials stored in a yml file. I\'ve followed the instructions on t

5条回答
  •  广开言路
    2020-12-06 05:22

    Do heroku config to check your environment variables.

    Normally they are all caps and have underbars instead of spaces.

    If it is not set, you should set the environment variable with

    heroku config:add BUCKET_NAME=my_bucket_name
    

    Update your code:

    :bucket => ENV['BUCKET_NAME'],
    

    Heroku reference

提交回复
热议问题