LoadError in ActiveStorage::Representations::RedirectController#show

I was getting

Could not open library 'glib-2.0.so.0': glib-2.0.so.0: cannot open shared object file: No such file or directory.
Could not open library 'libglib-2.0.so.0': libglib-2.0.so.0: cannot open shared object file: No such file or directory

on a Rails 7 app which defaults to image_processing gem which uses vips.

I fixed it by adding libvips42 to DEPLOY_PACKAGES in the Dockerfile.

I also opened a PR to fix the template so this will be done automatically.

I’m only posting this post so someone searching for any keyword in it will find it.

Tnanks! Merged. Relased.

Related: Dockerless Rails Development - my goal is to make changes like the one you provided not just apply at launch time, but potentially at every deploy.

1 Like