New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Active Text / Active Storage: vips.so.42: cannot open shared object file: No such file or directory #43976
Comments
Similar issue here. I think that a reason this error might happen is that turbo is not installed. In the YouTube video hotwire is installed by default. For three of my attempts following along with rails 7 it wasn't. If its not installed running
Doing the turbo install adds a number of gems.
which may fix the issue. I did update imagemagick and install Vips, and I've just done another version of the blog app and now hotwire is installing by default! Not sure if the two things are related. |
@overdrivemachines could you share a sample app that reproduces the issue? It'd be good to confirm what gems are present. |
To reproduce: I was also following DHH guide using the latest Dockerfile with the default rails new Gemfile. uncomment:
which updates:
However, it was a fairly simple fix based on https://www.libvips.org/install.html since I've used ubuntu a lot to search for a vips package (imagemagick not required) the Gemfile comment could be changed to: for example for the tutorial i was using the docker ruby image, so I added one new package and rebuilt the container for this: libvips-dev added below: FROM ruby:3.1.0-rc-slim RUN apt-get update -qq for vips it would be an upstream PR to make the error message better: The requirement is discussed here. #43182 For windows users it looks like the dependency is already installed. |
https://guides.rubyonrails.org/active_storage_overview.html#requirements documents this.
A PR to make the error message better would be awesome, if anyone wants to make one. |
If anyone decides to pick that, you can use |
hi can you please tell me where to put that `
` |
Root cause
Solution 1 (change back to use
|
This issue has been automatically marked as stale because it has not been commented on for at least three months. |
Yeah, I had the same issue just now with ActiveStorage. I worked around it by doing |
I had a very similar problem when I wanted to view a uploaded picture (using trix) and constantly got this message: LoadError in ActiveStorage::Representations::RedirectController#showCould not open library 'vips.so.42': vips.so.42: cannot open shared object file: No such file or directory. Could not open library 'libvips.so.42': libvips.so.42: cannot open shared object file: No such file or directory
Thank you for sharing the solution, much appreciated. |
After
Then I did |
Steps to reproduce
I encountered this error while following DHH's youtube video "Rails 7: The Demo" at 9:10. I have a fresh install of Ubuntu 20.04 and RoR. I got the same error on another computer with a freshly installed Ubuntu and RoR. Here are the steps:
Expected behavior
contents of form get saved normally along with image getting uploaded.
Actual behavior
Rails server quits and I see the following error:
System configuration
Rails version: 7.0.0
Ruby version: 3.0.3
What fixed the issue:
I installed ImageMagick and libvips:
sudo apt install imagemagick libvips
and the error went away and everything works normally. It took me a long time to figure that out. I hope there is a more appropriate error message when ImageMagick and libvips are not installed on the computer. The error message should clearly ask the user to install ImageMagick to proceed. This will save a lot of frustration and time.The text was updated successfully, but these errors were encountered: