[Locomotive-users] Installing RMagick
Lori M Olson
loriolson at mac.com
Wed Jul 12 02:37:51 GMT 2006
On 11-Jul-06, at 8:30 PM, Geoff Dougherty wrote:
> 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
>
> _______________________________________________
> Locomotive-users mailing list
> Locomotive-users at lists.raaum.org
> http://lists.raaum.org/mailman/listinfo/locomotive-users
You can always sprinkle logging statements throughout this method, so
you can narrow down which statement in particular is hanging on you.
Regards, Lori
More information about the Locomotive-users
mailing list