Rails 4.1 - LoadError:无法加载此类文件 - active_support / core_ext / string / encoding

时间:2014-05-30 19:22:02

标签: ruby-on-rails ruby bundler

我今天正在更新到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>'

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

1 个答案:

答案 0 :(得分:5)

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

Removed deprecated String#encoding_aware? core extensions (core_ext/string/encoding).

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