0

我不知道这是怎么发生的,但很可能是我现在开始时不小心在众多文件之一中添加了一个 UTF-8 字符

rails s

我得到错误:

[2013-04-19 21:56:34] ERROR Encoding::UndefinedConversionError: "\xAD" from ASCII-8BIT to UTF-8
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/log.rb:58:in `write'
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/log.rb:58:in `<<'
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/log.rb:58:in `log'
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/log.rb:133:in `log'
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/log.rb:71:in `error'
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:98:in `rescue in run'
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/httpserver.rb:113:in `run'
/usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'

如何找到导致此问题的文件?

我已经在每个语言环境文件中添加了 # encoding: UTF-8。所以不是他们。

4

1 回答 1

0

不知道这里发生了什么,我跑了

sudo dpkg-reconfigure locales
sudo update-locale

重新启动网络服务器,一切恢复正常。这里发生了非常非常奇怪的事情。错误不知从何而来。

于 2013-04-19T15:02:40.750 回答