【发布时间】:2016-02-14 13:18:34
【问题描述】:
我一直在碰壁,试图让它在生产中发挥作用。出于某种原因,它可以在本地运行,但不能在 heroku 上运行。
我不断收到此错误消息
Sessions#index 中的ArgumentError
invalid configuration option :provider
At first I assume it was because of this!
但后来在进一步挖掘后我发现它指向我的
initializers/aws.rb
CarrierWave.configure do |config|
config.storage = :aws
config.aws_bucket = 'thehatgame'
config.aws_acl = :public_read
config.aws_authenticated_url_expiration = 60 * 60 * 24 * 365
config.aws_credentials = {
:provider => 'AWS',
:access_key_id => ENV['SECRET_KEY'],
:secret_access_key => ENV['SECRET_ACCESS_KEY'],
:region => ENV['S3_REGION']
}
end
欢迎任何帮助,我确实找到了link 来解决类似的问题,但这也没有用
【问题讨论】:
-
你试过删除那个键吗?当您定义
aws_credentials时,您似乎不需要provider。 -
谢谢@RyanK 因为你是第一个用相同的答案发表评论的人,我相信你
标签: ruby-on-rails amazon-web-services heroku configuration