I use the carrier wave to load gifs, which works just fine, the problem occurs when I try to generate a version of the thumb and convert gif to jpeg with only the first image in gif, like a thumb, I get an error message:
LocalJumpError in ImagesController
no block given (yield)
app/controllers/images_controller.rb:21:in `new'
app/controllers/images_controller.rb:21:in `create'
Inquiry
Parameters:
{"utf8"=>"✓",
"authenticity_token"=>"lPEjP1WtPxFdizL2/FAWGHzOZPtecb5nKzKO8dg5ZdE=",
"image"=>{"image"=>
@content_type="image/gif",
@headers="Content-Disposition: form-data; name=\"image[image]\"; filename=\"some-file-name.gif\"\r\nContent-Type: image/gif\r\n",
@tempfile=
"remote_image_url"=>"",
"title"=>"The red panda",
"nsw"=>"0"},
"commit"=>"Roll GIF"}
Here's the im code used to generate the thumb:
version :thumb do
process :resize_to_limit => [200, 200]
process :convert => 'jpg'
end
Hope you guys can help and thank you in advance.
source
share