LoadError:无法加载此类文件 -- i18n/core_ext/hash

问题描述 投票:0回答:0

我正在处理多个项目,当我从一个项目切换到另一个项目时,使用以下方式编译资产:

➜ rails assets:precompile

红宝石:2.7.5 导轨:6.0

我得到的是:

/Users/luqman/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:68: warning: previous definition of ProtocRetryError was here
/Users/luqman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/net/protocol.rb:206: warning: already initialized constant Net::BufferedIO::BUFSIZE
/Users/luqman/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:214: warning: previous definition of BUFSIZE was here
/Users/luqman/.rvm/rubies/ruby-2.7.5/lib/ruby/2.7.0/net/protocol.rb:503: warning: already initialized constant Net::NetPrivate::Socket
/Users/luqman/.rvm/rubies/ruby-2.7.5/lib/ruby/gems/2.7.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:541: warning: previous definition of Socket was here
rails aborted!
LoadError: cannot load such file -- i18n/core_ext/hash
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `block in require'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/activesupport-6.0.6.1/lib/active_support/dependencies.rb:324:in `require'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/chewy-7.1.0/lib/chewy.rb:17:in `<main>'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/Users/luqman/Desktop/techdots-projects/ccc/config/application.rb:7:in `<main>'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/Users/luqman/Desktop/techdots-projects/ccc/Rakefile:4:in `<main>'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/railties-6.0.6.1/lib/rails/commands/rake/rake_command.rb:22:in `block in perform'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/railties-6.0.6.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/railties-6.0.6.1/lib/rails/command.rb:48:in `invoke'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/railties-6.0.6.1/lib/rails/commands.rb:18:in `<main>'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/Users/luqman/.rvm/gems/ruby-2.7.5/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)

问题似乎出在 i18n gem 上。我什至尝试更新捆绑器。但仍然遇到这个问题。

即使运行完整的跟踪也没有给我任何东西。

ruby-on-rails ruby rubygems bundler rails-i18n
© www.soinside.com 2019 - 2024. All rights reserved.