gpt4 book ai didi

ruby-on-rails - Rails 4.1 - LoadError : cannot load such file -- active_support/core_ext/string/encoding

转载 作者:数据小太阳 更新时间:2023-10-29 07:30:11 26 4
gpt4 key购买 nike

我今天要更新到 Rails 4.1。我运行了 bundle update rails,一切似乎都更新得很好。但是,当我现在尝试运行任何 rake 任务时,我收到以下错误:

$ rake --trace
rake aborted!
LoadError: cannot load such file -- active_support/core_ext/string/encoding
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/bsm-sso-client-0.8.4/lib/bsm/sso/client/url_helpers.rb:1:in `<top (required)>'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/bsm-sso-client-0.8.4/lib/bsm/sso/client/strategies/ticket.rb:2:in `<class:Ticket>'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/bsm-sso-client-0.8.4/lib/bsm/sso/client/strategies/ticket.rb:1:in `<top (required)>'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/bsm-sso-client-0.8.4/lib/bsm/sso/client/strategies.rb:5:in `<top (required)>'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/bsm-sso-client-0.8.4/lib/bsm/sso/client.rb:100:in `<top (required)>'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/bsm-sso-client-0.8.4/lib/bsm-sso-client.rb:1:in `require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/bsm-sso-client-0.8.4/lib/bsm-sso-client.rb:1:in `<top (required)>'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/Users/foobar/Work/VerveWireless/gemset/config/application.rb:5:in `<top (required)>'
/Users/foobar/Work/VerveWireless/gemset/Rakefile:5:in `require'
/Users/foobar/Work/VerveWireless/gemset/Rakefile:5:in `<top (required)>'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/rake-10.3.2/lib/rake/application.rb:687:in `raw_load_rakefile'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/rake-10.3.2/lib/rake/application.rb:94:in `block in load_rakefile'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/rake-10.3.2/lib/rake/application.rb:93:in `load_rakefile'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/rake-10.3.2/lib/rake/application.rb:77:in `block in run'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/bin/rake:23:in `load'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/bin/rake:23:in `<main>'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/bin/ruby_noexec_wrapper:14:in `eval'
/Users/foobar/.rvm/gems/ruby-2.0.0-p247@gemset/bin/ruby_noexec_wrapper:14:in `<main>'

似乎是一个依赖性问题,但我无法弄清楚缺少什么。任何帮助都会很棒,谢谢!

最佳答案

经过一些挖掘,我在发行说明的 Rails 4.1 删除部分找到了它。

删除了已弃用的 String#encoding_aware?核心扩展(core_ext/string/encoding)。

因此必须删除或修改此行 require 'active_support/core_ext/string/encoding' 的任何实例。

关于ruby-on-rails - Rails 4.1 - LoadError : cannot load such file -- active_support/core_ext/string/encoding,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23962018/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com