Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Spree extension for using carrierwave/fog over paperclip.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Spree Carrierwave

This is a Spree extension that uploads images to Amazon S3 via CarrierWave instead of the default Paperclip.


The Paperclip gem uses the aws-s3 gem, which causes problems when used with Spree:

superclass mismatch for class PriceBucket (TypeError)

Some have claimed to have gotten around this, but the solutions given haven't worked for me.


Add spree_carrierwave to your Gemfile and bundle.


Create an initializer for CarrierWave (config/initializers/spree_carrierwave.rb):

# See the section titled 'Using Amazon S3' at
# for full options.

CarrierWave.configure do |config|
  config.fog_credentials = {
    :provider               => 'AWS',
    :aws_access_key_id      => ENV['AWS_ACCESS_KEY_ID'],
    :aws_secret_access_key  => ENV['AWS_SECRET_ACCESS_KEY']
  config.fog_directory  = 'my-bucket'
  config.fog_attributes = { 'Cache-Control'=>'max-age=315576000' }


Copyright (c) 2012 Genuity Technology Services, released under the New BSD License

Something went wrong with that request. Please try again.