Using Rails 3.2.12 and Ruby 1.9.2 I simply want to use carrierwave/minimagick as so:
In my Gemfile
gem 'carrierwave'
gem 'mini_magick'
In my uploader
require 'carrierwave/processing/mini_magick'
class AvatarUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
# Include the Sprockets helpers for Rails 3.1+ asset pipeline compatibility:
include Sprockets::Helpers::RailsHelper
include Sprockets::Helpers::IsolatedHelper
# Choose what kind of storage to use for this uploader:
storage :file
# storage :fog
# Override the directory where uploaded files will be stored.
# This is a sensible default for uploaders that are meant to be mounted:
# Provide a default URL as a default if there hasn't been a file uploaded:
def default_url
# # For Rails 3.1+ asset pipeline compatibility:
ActionController::Base.helpers.asset_path("fallback/" + [version_name, "default.png"].compact.join('_'))
end
process :resize_to_fit => [800, 800]
version :thumb do
process :resize_to_fit => [200,200]
end
version :mini do
process :resize_to_fit => [50,50]
end
version :medium do
process :resize_to_fit => [250,250]
end
def extension_white_list
%w(jpg jpeg gif png)
end
end
The problem is that the thumb, mini and medium versions are saving itself properly but not resizing (the size is the same for all versions).
anyone experiencing something similar?