Gemfile:
gem 'fog'
config / environment / production.rb
Paperclip::Attachment.default_options.update({
:path => ":picturable_name/:basename_:style.:extension",
:storage => :fog,
:fog_credentials => {
:provider => 'Rackspace',
:rackspace_username => RACKSPACE_USERNAME,
:rackspace_api_key => RACKSPACE_API_KEY,
:persistent => false
},
:fog_directory => CONTAINER_NAME,
:fog_public => true
})