问题:上传到heroku中storage :fog的bug

在push heroku的时候出现 uninitialized constant CarrierWave::Storage::Fog(NameError)

Since require works with $LOAD_PATH and my Rails app has lib in its load path, I did the following: $ touch lib/fog.rb where the file contains the following

module Fog
  # :D
end

and then in my CarrierWave initializer I did the following:

require 'carrierwave/storage/abstract'
require 'carrierwave/storage/file'
require 'carrierwave/storage/fog'

CarrierWave.configure do |config|
  …

heroku run bundle install the app then works with fog-aws

参考网址: https://github.com/fog/fog/issues/3429