我的UTF-8
Rails 应用程序遇到了问题,我最近从另一位开发人员那里接手了该应用程序。虽然我知道错误的含义,并且我知道我需要将所有内容强制为 UTF-8,但没有运气。我试过清理应用程序目录并将所有.rb
文件更新为 UTF-8(之前在不同的应用程序上工作过)。
我还阅读了关于 UTF-8 问题的不同帖子(例如此处和此处),但运气不佳。
当我运行bundle update
或任何其他捆绑操作时,我得到以下信息:
~/my_app/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler.rb:285:in 'split': invalid byte sequence in UTF-8
捆绑器的以下附加错误。
当我尝试运行时,rails s
我得到:
/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler.rb:285:in 'split': invalid byte sequence in UTF-8 (ArgumentError)
from ~/.rvm/gems/ruby-2.0.0-p247/gems/bundler-1.3.5/lib/bundler/setup.rb:7:in `<top (required)>'
from ~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:116:in `require'
from ~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:116:in `rescue in require'
from ~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:122:in `require'
from ~/Development/gorefi/gorefi/config/boot.rb:6:in `<top (required)>'
from ~/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require'
from /Users/gorefi/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:51:in `require'
更新
我尝试创建一个新应用程序并遇到此错误,这绝对是相关的。完全不知道现在发生了什么!
ArgumentError: invalid byte sequence in UTF-8
An error occurred while installing rake (10.1.0), and Bundler cannot continue.
Make sure that `gem install rake -v '10.1.0'` succeeds before bundling.