由于 LoadError 导致 Rails 无法启动(找不到存在的文件)

时间:2021-03-11 14:11:12

标签: ruby-on-rails bundler libffi

我使用的是 ubuntu 20.04 有一个一直运行到上个月的 rails 应用程序。 但是证书问题让我重新安装了 nginx 和乘客以及一些依赖项。

然而,所有 rails 命令(consoleserverassets:precompile)现在都失败并出现以下错误

/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)

但是当我检查时,一切似乎都很好..该文件确实存在:

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*

知道如何让应用重新运行吗?

0 个答案:

没有答案
相关问题