大家早上好。
我試圖理解下面的錯誤,但由于我是 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
這是我的寶石檔案
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.7.1'
gem 'rails', '~> 6.1.4'
gem 'pg', '~> 1.1'
gem 'puma', '~> 5.0'
gem 'bcrypt', '~> 3.1.7'
gem 'jwt'
gem 'simple_command'
gem "rqrcode", "~> 2.0"
gem "pundit"
gem 'rack-cors'
gem 'active_model_serializers', "~> 0.10.2"
gem 'kaminari'
gem 'carrierwave'
gem 'fog', require: 'fog/aws'
gem "aws-sdk-s3", require: false
gem 'mini_magick'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.4', require: false
gem 'paranoia', '~> 2.1'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'faker'
gem 'cpf_faker'
gem "awesome_print", require:"ap"
gem 'factory_bot_rails'
gem 'faker'
gem 'rspec-rails'
end
group :test do
gem "database_cleaner-active_record", "~> 2.0"
gem "shoulda-matchers"
gem "simplecov", "~> 0.21.2", require: false
end
group :development do
gem 'faker'
gem 'listen', '~> 3.3'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
root@1:/app# bundler -v
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/error.rb:105: warning: constant DidYouMean::SPELL_CHECKERS is deprecated
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Bundler version 2.1.4
root@1:/app# gem list | grep bundl
bundle (0.0.1)
bundler (2.3.5, 2.1.4)
root@1:/app#
uj5u.com熱心網友回復:
首先,關于的訊息DidYouMean是棄用警告而不是錯誤,它不會破壞您的應用程式。這意味著DidYouMean::SPELL_CHECKERS不推薦使用 of 并將在未來的 ruby?? 版本中洗掉。在這種情況下,在Ruby 3.3中。在您使用低于 3.3 的版本之前,您不必擔心它。觸發警告的不是您的代碼。它來自一顆名為Thor的寶石。該問題在雷神 1.2.0 版中得到解決。您可以通過呼叫來更新 gem bundle update thor。
實際錯誤來自bootsnapgem:
/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)
據我所知,它會加載psychgem 并失敗。
嘗試在此處更新bundle update bootsnap或洗掉或檢查建議的解決方案。
如果它沒有幫助,如果您提供 , 和 gems 的版本可能bootsnap會psych有所stringio幫助
gem list psych
gem list stringio
gem list bootsnap
或者你的 Gemfile.lock
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/419425.html
標籤:
上一篇:洗掉列并用自定義方法替換它
