ruby-on-rails RAILS调用'DidYouMean::SPELL_CHECKERS.merge!(错误名称=>拼写检查器)'已经过时

r55awzrz  于 2023-02-01  发布在  Ruby
关注(0)|答案(3)|浏览(191)

早上好各位。
我试着理解下面的错误,但是由于我是rails的新手,我不太理解。有人知道它可能是什么吗?
我在网上搜索了一下,但没有找到任何具体的信息。
我在网上搜索了一下,但是没有找到任何东西,如果有人看到了或者有链接,你可以发给我,我会看到的。
如果你需要更多的信息来帮助,让我知道,我会编辑后,并添加它,我不知道是否有任何其他我可以已经张贴。
谢谢你的帮助!

➜ make up  
docker-compose up
Starting XXXXXX_postgres    ... done
Starting XXXXXX_mailcatcher ... done
Starting XXXXXX_rails       ... done
Attaching to XXXXXX_mailcatcher, XXXXXX_postgres, XXXXXX_rails
XXXXXX_mailcatcher    | Starting MailCatcher
XXXXXX_mailcatcher    | ==> smtp://0.0.0.0:1025
XXXXXX_postgres       | 
XXXXXX_postgres       | PostgreSQL Database directory appears to contain a database; Skipping initialization
XXXXXX_postgres       | 
XXXXXX_mailcatcher    | /usr/local/bundle/gems/thin-1.5.1/lib/thin/server.rb:104: warning: constant ::Fixnum is deprecated
XXXXXX_postgres       | 2022-01-21 11:02:46.949 UTC [1] LOG:  starting PostgreSQL 12.8 (Debian 12.8-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
XXXXXX_mailcatcher    | ==> http://0.0.0.0:1080
XXXXXX_postgres       | 2022-01-21 11:02:46.949 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
XXXXXX_postgres       | 2022-01-21 11:02:46.949 UTC [1] LOG:  listening on IPv6 address "::", port 5432
XXXXXX_postgres       | 2022-01-21 11:02:46.954 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
XXXXXX_postgres       | 2022-01-21 11:02:46.967 UTC [26] LOG:  database system was shut down at 2022-01-21 11:02:42 UTC
XXXXXX_postgres       | 2022-01-21 11:02:46.973 UTC [1] LOG:  database system is ready to accept connections
XXXXXX_rails          | /usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/error.rb:105: warning: constant DidYouMean::SPELL_CHECKERS is deprecated
XXXXXX_rails          | Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
XXXXXX_rails          | Traceback (most recent call last):
XXXXXX_rails          |  52: from bin/rails:2:in `<main>'
XXXXXX_rails          |  51: from bin/rails:2:in `load'
XXXXXX_rails          |  50: from /app/bin/spring:7:in `<top (required)>'
XXXXXX_rails          |  49: from /app/bin/spring:7:in `tap'
XXXXXX_rails          |  48: from /app/bin/spring:10:in `block in <top (required)>'
XXXXXX_rails          |  47: from /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
XXXXXX_rails          |  46: from /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
XXXXXX_rails          |  45: from /usr/local/bundle/gems/spring-3.0.0/lib/spring/binstub.rb:11:in `<top (required)>'
XXXXXX_rails          |  44: from /usr/local/bundle/gems/spring-3.0.0/lib/spring/binstub.rb:11:in `load'
XXXXXX_rails          |  43: from /usr/local/bundle/gems/spring-3.0.0/bin/spring:49:in `<top (required)>'
XXXXXX_rails          |  42: from /usr/local/bundle/gems/spring-3.0.0/lib/spring/client.rb:30:in `run'
XXXXXX_rails          |  41: from /usr/local/bundle/gems/spring-3.0.0/lib/spring/client/command.rb:7:in `call'
XXXXXX_rails          |  40: from /usr/local/bundle/gems/spring-3.0.0/lib/spring/client/rails.rb:28:in `call'
XXXXXX_rails          |  39: from /usr/local/bundle/gems/spring-3.0.0/lib/spring/client/rails.rb:28:in `load'
XXXXXX_rails          |  38: from /app/bin/rails:4:in `<top (required)>'
XXXXXX_rails          |  37: from /app/bin/rails:4:in `require_relative'
XXXXXX_rails          |  36: from /app/config/boot.rb:4:in `<top (required)>'
XXXXXX_rails          |  35: from /app/config/boot.rb:4:in `require'
XXXXXX_rails          |  34: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/setup.rb:4:in `<top (required)>'
XXXXXX_rails          |  33: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap.rb:112:in `default_setup'
XXXXXX_rails          |  32: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap.rb:70:in `setup'
XXXXXX_rails          |  31: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/compile_cache.rb:20:in `setup'
XXXXXX_rails          |  30: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/compile_cache/yaml.rb:50:in `install!'
XXXXXX_rails          |  29: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/compile_cache/yaml.rb:55:in `init!'
XXXXXX_rails          |  28: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
XXXXXX_rails          |  27: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
XXXXXX_rails          |  26: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
XXXXXX_rails          |  25: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
XXXXXX_rails          |  24: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
XXXXXX_rails          |  23: from /usr/local/lib/ruby/2.7.0/yaml.rb:4:in `<main>'
XXXXXX_rails          |  22: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
XXXXXX_rails          |  21: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
XXXXXX_rails          |  20: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
XXXXXX_rails          |  19: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
XXXXXX_rails          |  18: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
XXXXXX_rails          |  17: from /usr/local/lib/ruby/2.7.0/psych.rb:15:in `<main>'
XXXXXX_rails          |  16: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
XXXXXX_rails          |  15: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
XXXXXX_rails          |  14: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
XXXXXX_rails          |  13: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
XXXXXX_rails          |  12: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
XXXXXX_rails          |  11: from /usr/local/lib/ruby/2.7.0/psych/nodes.rb:2:in `<main>'
XXXXXX_rails          |  10: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
XXXXXX_rails          |   9: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
XXXXXX_rails          |   8: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
XXXXXX_rails          |   7: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
XXXXXX_rails          |   6: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
XXXXXX_rails          |   5: from /usr/local/lib/ruby/2.7.0/psych/nodes/node.rb:2:in `<main>'
XXXXXX_rails          |   4: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
XXXXXX_rails          |   3: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
XXXXXX_rails          |   2: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
XXXXXX_rails          |   1: from /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
XXXXXX_rails          | /usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': superclass mismatch for class StringIO (TypeError)
XXXXXX_rails exited with code 1

这是我的宝石档案
x一个一个一个一个x一个一个二个x

wztqucjr

wztqucjr1#

我在将Rails项目中的Ruby从3.0.4更新到3.1.2时遇到过这种情况。
这帮我解决了这个问题:

bundle update --bundler

希望有帮助。

0ejtzxu1

0ejtzxu12#

首先,关于DidYouMean的消息是一个弃用警告而不是错误,这并不会破坏你的应用。这意味着DidYouMean::SPELL_CHECKERS的使用已经过时,并将在未来的ruby版本中删除。在Ruby 3.3中就是这样。在使用低于3.3的版本之前,你不应该担心这个问题。触发警告的不是你的代码。来自一个叫Thor的gem,这个问题在thor 1.2.0版本中已经解决了,你可以通过调用bundle update thor来更新gem。
实际错误来自bootsnap gem:

/usr/local/bundle/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require': superclass mismatch for class StringIO (TypeError)

据我所知,它加载psych gem并失败。
尝试更新它bundle update bootsnap或删除或检查建议的solutions here
如果它没有帮助,则提供bootsnappsychstringio gem的版本可能会有帮助

gem list psych
gem list stringio
gem list bootsnap

或您的Gemfile.lock

gxwragnw

gxwragnw3#

试试bundle _2.3.3_ update --bundler
对我很有效!谢谢

相关问题