Tôi đã theo các hướng dẫn triển khai từ Carrierwave với làm thế nào để triển khai trên Heroku cho một ứng dụng Rails sử dụng Amazon S3:Cấu hình cho Carrierwave với Amazon S3, lưu trữ trên Heroku
https://github.com/carrierwaveuploader/carrierwave/wiki/How-to%3A-Make-Carrierwave-work-on-Heroku
Tôi đã thêm dòng bổ sung vào config.ru và tạo tệp config/initializers/carrierwave.rb, nhưng không thành công.
Dưới đây là bộ khởi tạo sóng mang, với các phím được chỉnh sửa lại.
Đây có phải là thiết lập chính xác không?
Tôi còn cần phải làm gì nữa?
Bất kỳ hướng dẫn từng bước nào để giúp tôi triển khai điều này?
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS', # required
:aws_access_key_id => REDACTED, # required
:aws_secret_access_key => REDACTED, # required
:region => 'eu-west-1', # optional, defaults to 'us-east-1'
:host => 's3.example.com', # optional, defaults to nil
:endpoint => 'https://s3.example.com:8080' # optional, defaults to nil
}
config.fog_directory = 'myawsbucket' # required
config.fog_public = false # optional, defaults to true
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {}
end