Last active
December 16, 2015 07:39
-
-
Save arthurnn/5400503 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FaviconLogosUploader < CarrierWave::Uploader::Base | |
include CarrierWave::MiniMagick | |
version :favicon do | |
process :resize_to_fit => [32, 32] | |
process :convert => :ico | |
def full_filename(for_file) | |
"favicon.ico" if original_filename | |
end | |
end | |
def filename | |
"original_favicon#{extension}" if original_filename | |
end | |
def extension | |
File.extname(original_filename) if original_filename | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CarrierWave::ProcessingError: Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: Command ("identify -quiet -ping "/Users/arthurnn/500px/portfolio/public/uploads/tmp/20130416-1920-24385-2807/favicon_screenshot.png"") failed: {:status_code=>1, :output=>"identify: improper image header `/Users/arthurnn/500px/portfolio/public/uploads/tmp/20130416-1920-24385-2807/favicon_screenshot.png' @ error/png.c/ReadPNGImage/3699.\n"} | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/processing/mini_magick.rb:264:in `rescue in manipulate!' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/processing/mini_magick.rb:258:in `manipulate!' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/processing/mini_magick.rb:107:in `convert' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/processing.rb:85:in `block in process!' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/processing.rb:81:in `each' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/processing.rb:81:in `process!' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/callbacks.rb:18:in `block in with_callbacks' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/callbacks.rb:18:in `each' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/callbacks.rb:18:in `with_callbacks' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/cache.rb:122:in `cache!' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/versions.rb:236:in `block in cache_versions!' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/versions.rb:221:in `each' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/versions.rb:221:in `cache_versions!' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/callbacks.rb:18:in `block in with_callbacks' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/callbacks.rb:18:in `each' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/callbacks.rb:18:in `with_callbacks' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/cache.rb:122:in `cache!' | |
from /Users/arthurnn/.rvm/gems/ruby-2.0.0-p0@500px_portfolios/gems/carrierwave-0.8.0/lib/carrierwave/uploader/store.rb:56:in `store!' | |
from (irb):28 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment