Pavarine
Pavarine

Reputation: 726

Rails 6 Active Storage image_processing gem issue

Using Rails 6.0 and 'image_processing', '~> 1.9.3'

When trying to show a cropped variant of an image with:

url_for(user.avatar.variant(crop: crop_geometry)&.processed)

I get an error:

You must have ImageMagick or GraphicsMagick installed

I thought that image_processing gem included any dependencies relatives to this. Should I install some missing dependencies or what? Thanks

Upvotes: 0

Views: 3360

Answers (2)

HM Tanbir
HM Tanbir

Reputation: 1020

You have to install library first.

For Mac user:

brew install imagemagick vips

For debian/ubuntu user:

sudo apt update
sudo apt install imagemagick libvips

Upvotes: 1

nuaky
nuaky

Reputation: 2086

It's in the docs, first step, you need to instal dependencies: https://github.com/janko/image_processing

1. Install ImageMagick and/or libvips:
> $ brew install imagemagick vips

I highly recommend using vips, it's much faster.

Upvotes: 3

Related Questions