ruby-on-rails 'requirect':无法加载此类文件-- ffi(LoadError)'requirect':当尝试启动rails控制台时,无法加载这样的文件-- ffi(LoadError

5m1hhzi4  于 2023-02-26  发布在  Ruby
关注(0)|答案(2)|浏览(209)

完整堆栈跟踪:

/Users/galharth/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- ffi (LoadError)
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/sys-proctable-1.1.1-universal-darwin/lib/darwin/sys/proctable.rb:2:in `<top (required)>'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `block in require'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:274:in `require'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/sys-proctable-1.1.1-universal-darwin/lib/sys-proctable.rb:1:in `<top (required)>'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
    from /Users/galharth/Documents/productbattle/config/application.rb:7:in `<top (required)>'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:141:in `require'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:141:in `require_application_and_environment!'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:67:in `console'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /Users/galharth/.rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

导轨版本:4.2.5 Ruby版本:2.3.0捆绑包版本:1.10.6操作系统X:El Capitan(使用窗口的同事)

uyhoqukh

uyhoqukh1#

请尝试运行gem install ffi --platform=ruby
有关更多细节和分辨率选项,请参见this issue

iq3niunx

iq3niunx2#

通过运行gem install ffi --platform=ruby,将gem 'ffi'行添加到我的Gemfile , and then running bundle install '中,我成功地安装了ffi gem。

相关问题