Rails does not start up due to LoadError (can't find file that exists)

91 Views Asked by At

I'm on an ubuntu 20.04 Had a rails application that used to run until last month. But a certificate issue made me reinstall nginx and passenger and some dependencies.

However all rails commands (console, server, assets:precompile) are now failing with the following error

/home/deploy/mark_antony/shared/bundle/ruby/2.7.0/gems/bootsnap-1.4.8/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': libffi.so.6: cannot open shared object file: No such file or directory - /home/deploy/mark_antony/shared/bundle/ruby/2.7.0/gems/ffi-1.13.1/lib/ffi_c.so (LoadError)

But when i check, everything seems perfectly fine.. the file does exist:

deploy@ubuntu-s-1vcpu:~/mark_antony/current$ cd /home/deploy/mark_antony/shared/bundle/ruby/2.7.0/gems/ffi-1.13.1/lib/
deploy@ubuntu-s-1vcpu:~/mark_antony/shared/bundle/ruby/2.7.0/gems/ffi-1.13.1/lib$ ll
total 476
drwxrwxr-x 3 deploy deploy   4096 Jan  7 19:08 ./
drwxrwxr-x 6 deploy deploy   4096 Jan  7 19:07 ../
drwxrwxr-x 4 deploy deploy   4096 Jan  7 19:07 ffi/
-rw-rw-r-- 1 deploy deploy    925 Jan  7 19:07 ffi.rb
-rwxr-xr-x 1 deploy deploy 467872 Jan  7 19:08 ffi_c.so*

Any idea on how to get the app working again?

0

There are 0 best solutions below