jnicklas/carrierwave — Issue #580: Carrierwave Gem - Heroku - Fog Gem configuration - Giving name error
Author: vezu
Created: 2012-01-03 18:21:13+00:00
State: open

I am a little lost with Heroku and Carrierwave Gem. I have read the WIKI, Read me and searched the net and i admit, i need help. Everything well on local but Heroku crushes the application.

**///ERROR MESSAGE FROM HEROKU LOGS**

2012-01-03T17:33:26+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/carrierwave-0.5.8/lib/carrierwave/uploader/configuration.rb:91:in `eval': uninitialized constant CarrierWave::Storage::Fog (NameError

**///GEM FILE**

gem "fog"
gem 'carrierwave'

**/app/uploaders/avatar_uploader.rb**

storage :fog

**/config/initializers/carrierwave.rb**

CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => 'XXXX',
:aws_secret_access_key => 'XXXX',
:region => 'eu-west-1' # optional, defaults to 'us-east-1'
}
config.fog_directory = 'site_images' # required
config.fog_public = true # optional, defaults to true
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {}
end

When i change the storage to file not fog, then i do not get errors. Are there any other fog settings i am skipping or missing. Any help greatly appreciated.