简体   繁体   English

尝试在 Rails 上启动 ruby​​ 时出错

[英]Getting error trying to start ruby on rails

I created a new app with ruby on rails and tried to start it, then got this error.我用 ruby​​ on rails 创建了一个新应用程序并尝试启动它,然后出现此错误。

1 - have ruby-dev-kit 1 - 有 ruby​​-dev-kit

2 - ruby version 2.7.0 2 - 红宝石版本 2.7.0

Tried to fix this error in many ways.尝试以多种方式修复此错误。 I use Linux我使用 Linux

Traceback追溯

       11: from /usr/lib/ruby/2.7.0/psych/nodes.rb:2:in `<main>'
        10: from /var/lib/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
         9: from /var/lib/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
         8: from /var/lib/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
         7: from /var/lib/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
         6: from /var/lib/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
         5: from /usr/lib/ruby/2.7.0/psych/nodes/node.rb:2:in `<main>'
         4: from /var/lib/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
         3: from /var/lib/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
         2: from /var/lib/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
         1: from /var/lib/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/lib/gems/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': superclass mismatch for class StringIO (TypeError)

The method is already defined somewhere else该方法已在其他地方定义

You can test that by using the defined?您可以使用defined? method and update gem version accordingly.方法并相应地更新 gem 版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM