[Locomotive-users] Installing RMagick

Geoff Dougherty geoff at geoffdougherty.com
Wed Jul 12 02:30:11 GMT 2006


Ryan,

Thanks for all your help. The app is now spinning for 5+ minutes w/  
no result when I try to upload & resize a photo. No error messages,  
nothing amiss in the development log.

I can't tell  whether it's a problem w/ the way I've installed   
rmagick on Locomotive, my RoR code, or something else.

Here's the method:

def picture=(picture_field)
     require 'rmagick'
     self.name = base_part_of(picture_field.original_filename)
     self.content_type = picture_field.content_type.chomp
     self.data = picture_field.read
     img = RMagick::Image::read(self.data)
    @width=img.columns
    @height=img.rows
    @ratio=@width/@height
    @newheight=@width*@ratio
    @picture.thumb = img.scale(125, "#@newheight")
end



More information about the Locomotive-users mailing list