2 months ago
After the railpack migration, all of our builds are failing due to the following error:
```bundle exec rake assets:precompile
1s
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'ruby-vips'. (Bundler::GemRequireError)
Gem Load Error is: Could 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.
Searched in <system library path>
Backtrace for gem load error is:
/usr/local/bundle/gems/ffi-1.17.2-x86_64-linux-gnu/lib/ffi/dynamic_library.rb:94:in 'FFI::DynamicLibrary.load_library'
It seems as if the ruby gem "ruby-vips" is not able to find the vips package installed on the system. This error is only occurring in the Railpack build, not the nixpacks build. Is there any additional configuration we need in order to get a successful build with rails?
2 Replies
2 months ago
Hey, have you tried to install libvips using RAILPACK_BUILD_APT_PACKAGES and/or RAILPACK_DEPLOY_APT_PACKAGES, which are the ways to install additional apt packages with Railpack as per the Railpack docs?
2 months ago
Yep this fixed it! Had to specifiy libvips in the RAILPACK_BUILD_APT_PACKAGES. Although I'm a bit confused as to why it's not installed automatically, as it mentions here that it install libvips-dev for the ruby railpack image.
Status changed to Solved brody • 2 months ago