Figaro Gem配置问题

时间:2015-07-17 23:03:40

标签: ruby-on-rails carrierwave

我正在尝试在Rails 4中设置Figaro,但是在设置了正确的yaml之后

application.yml

aws_access_key_id:'#' 
aws_secret_access_key:'#' 
fog_directory:'#' 

CarrierWave.rb

CarrierWave.configure do |config|                       
  config.fog_credentials = {
    provider:               "AWS",                        # required
    aws_access_key_id:     ENV["aws_access_key_id"],                        # required
    aws_secret_access_key:    ENV["aws_secret_access_key"],                           # required
  }
  config.fog_directory  = ENV["fog_directory"]                          # required

end

我一直收到此错误

`global_configuration': undefined method `reject' for #<String:0x007f9c7a0d9a80> (NoMethodError)

我调查了类似的问题,但没有找到正确的答案,YAML工作在http://www.yamllint.com/

1 个答案:

答案 0 :(得分:0)

yaml文件是超级敏感的,即使它传递给http://www.yamllint.com/,也有一个没有捕获的格式错误