‘require’:无法加载此类文件 -- 2.6/ffi_c (LoadError) Rails

发布于 2025-01-10 20:22:26 字数 1661 浏览 0 评论 0原文

我是 ruby​​ 新手,我克隆了一个存储库并运行了 bundle install,但是当我运行我的应用程序时出现以下错误:

  1: from /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': cannot load such file -- 2.6/ffi_c (LoadError)
        72: from bin/rails:3:in `<main>'
        71: from bin/rails:3:in `load'
        70: from /Users/sachendra/Desktop/data_service/bin/spring:15:in `<top (required)>'
        69: from /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
        68: from /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
        67: from /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
         1: from /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': dlopen(/Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/ffi-1.9.25/lib/ffi_c.bundle, 0x0009): symbol not found in flat namespace '_ffi_prep_closure' - /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/ffi-1.9.25/lib/ffi_c.bundle (LoadError)

我发现有人有相同的问题,但他们中没有人在 Rails 和任何应用程序中遇到问题其中对我有用。 我正在使用 mac 操作系统。

I'm new to ruby, I cloned a repo and ran bundle install, but when I run my app got the following error:

  1: from /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': cannot load such file -- 2.6/ffi_c (LoadError)
        72: from bin/rails:3:in `<main>'
        71: from bin/rails:3:in `load'
        70: from /Users/sachendra/Desktop/data_service/bin/spring:15:in `<top (required)>'
        69: from /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
        68: from /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:65:in `require'
        67: from /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
         1: from /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require': dlopen(/Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/ffi-1.9.25/lib/ffi_c.bundle, 0x0009): symbol not found in flat namespace '_ffi_prep_closure' - /Users/sachendra/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/ffi-1.9.25/lib/ffi_c.bundle (LoadError)

I found people with same issues but none of them have problem in rails and any of them is useful for me.
I'm using mac-os.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文