在我的本机上设置了环境了变量,Carrierwave 用到的 AWS KEY, 登录到 VPS 上在 .bashrc 里面也设置好了变量。
但, mina deploy
一直报错。
rake aborted!
ArgumentError: Missing required arguments: aws_access_key_id, aws_secret_access_key
/home/steven/ps.stevenwu.cn/tmp/build-14186476581958/vendor/bundle/ruby/2.1.0/gems/fog-core-1.27.1/lib/fog/core/service.rb:244:in `validate_options'
/home/steven/ps.stevenwu.cn/tmp/build-14186476581958/vendor/bundle/ruby/2.1.0/gems/fog-core-1.27.1/lib/fog/core/service.rb:268:in `handle_settings'
CarrierWave.configure do |config|
if Rails.env.staging? || Rails.env.production?
config.storage = :fog
config.fog_credentials = {
:provider => 'AWS', # required
:aws_access_key_id => ENV['AWS_ACCESS_KEY'], # required
:aws_secret_access_key => ENV['AWS_ACCESS_KEY'], # required
}
config.fog_directory = 'steven-flix' # required
else
config.storage = :file
config.enable_processing = Rails.env.development?
end