Please note: This is a legacy Rails project Ruby 2.7.7, Rails v5.2.4.6
I’ve been grappling with this for a couple hours. It was happening earlier during the bundler process and it seemed like I was able to work past that by modifying Dockerfile:
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential libpq-dev libvips node-gyp pkg-config python-is-python3 redis musl-dev
RUN ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
However, now I’m getting the same error at application start:
2023-02-13T14:38:38Z [info]/usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:37:in `require': libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory - /rails/vendor/bundle/ruby/2.7.0/gems/msgpack-1.6.0/lib/msgpack/msgpack.so (LoadError)
Full error log:
Recent Events
TIMESTAMP TYPE MESSAGE
2023-02-13T14:37:16Z Received Task received by client
2023-02-13T14:37:16Z Task Setup Building Task Directory
2023-02-13T14:38:17Z Started Task started by client
2023-02-13T14:38:21Z Terminated Exit Code: 1
2023-02-13T14:38:21Z Restarting Task restarting in 1.158539694s
2023-02-13T14:38:26Z Started Task started by client
2023-02-13T14:38:30Z Terminated Exit Code: 1
2023-02-13T14:38:30Z Restarting Task restarting in 1.128677243s
2023-02-13T14:38:36Z Started Task started by client
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache.rb:68:in `<top (required)>'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap.rb:5:in `require_relative'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in `require_rel
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in `require_rel
tive'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in `<top (required)>'
2023-02-13T14:38:38Z [info] from /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:37:in `require'
2023-02-13T14:38:38Z [info] from /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:37:in `require'
2023-02-13T14:38:38Z [info] from /rails/config/boot.rb:4:in `<top (required)>'
2023-02-13T14:38:38Z [info] from /rails/bin/rails:3:in `require_relative'
2023-02-13T14:38:38Z [info] from /rails/bin/rails:3:in `<main>'
2023-02-13T14:38:38Z [info]/usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:37:in `require': libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory - /rails/vendor/bundle/ruby/2.7.0/gems/msgpack-1.6.0/lib/msgpack/msgpack.so (LoadError)
2023-02-13T14:38:38Z [info] from /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:37:in `require'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/msgpack-1.6.0/lib/msgpack.rb:7:in `<top (required)>'
2023-02-13T14:38:38Z [info] from /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:37:in `require'
2023-02-13T14:38:38Z [info] from /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:37:in `require'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/store.rb:5:in `block in <top (required)>'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap/explicit_require.rb:42:in `with_gems'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/store.rb:5:in `<top (required)>'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache.rb:68:in `require_relative'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache.rb:68:in `<top (required)>'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap.rb:5:in `require_relative'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap.rb:5:in `<top (required)>'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in `require_relative'
2023-02-13T14:38:38Z [info] from /rails/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.16.0/lib/bootsnap/setup.rb:3:in `<top (required)>'
2023-02-13T14:38:38Z [info] from /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:37:in `require'
2023-02-13T14:38:38Z [info] from /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:37:in `require'
2023-02-13T14:38:38Z [info] from /rails/config/boot.rb:4:in `<top (required)>'
2023-02-13T14:38:38Z [info] from /rails/bin/rails:3:in `require_relative'
2023-02-13T14:38:38Z [info] from /rails/bin/rails:3:in `<main>'
2023-02-13T14:38:39Z [info]Starting clean up.
--> v0 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v1
--> Troubleshooting guide at https://fly.io/docs/getting-started/troubleshooting/
Error abort
Thanks for your help!