Gem 更新:无法转换“xE7"从 ASCII-8BIT 到 UTF-8 到 US-ASCII 转换到 UTF-8 [英] Gem update: unable to convert "xE7" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII

查看:18
本文介绍了Gem 更新:无法转换“xE7"从 ASCII-8BIT 到 UTF-8 到 US-ASCII 转换到 UTF-8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚在一个有一段时间没有更新的轻型服务器机器上运行了 gem update...并且我收到了大量的无法转换"x??到 UTF-8 从 ASCII-8BIT 到 UTF-8 到 US-ASCII 的转换中..."的错误.包括控制台中的一个例外.有人知道发生了什么吗?

just ran gem update on a light use server machine that hadn't been updated in a while... and am getting loads of 'unable to convert "x??" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for..." errors. Included is an except from console. anyone know what's going on?

$ sudo gem update
Installing ri documentation for railties-3.0.4...
Installing ri documentation for minitest-2.0.2...
Installing ri documentation for net-ssh-2.1.0...
unable to convert "xE7" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/net/ssh/authentication/pageant.rb, skipping
unable to convert "xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/net/ssh/buffered_io.rb, skipping
unable to convert "xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/net/ssh/service/forward.rb, skipping
unable to convert "xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for THANKS.rdoc, skipping
unable to convert "xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for CHANGELOG.rdoc, skipping
Installing ri documentation for rails-3.0.4...
file 'lib' not found
Installing ri documentation for rails3-generators-0.17.4...
unable to convert "xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
Installing ri documentation for rdoc-3.5.3...
unable to convert U+201D from UTF-8 to US-ASCII for lib/rdoc/text.rb, skipping
unable to convert "xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for History.txt, skipping
Installing ri documentation for rspec-core-2.5.1...
unable to convert "xC2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/rspec/core/subject.rb, skipping
Installing ri documentation for rspec-expectations-2.5.0...
unable to convert "xC2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for lib/rspec/matchers.rb, skipping
Installing ri documentation for rspec-mocks-2.5.0...
Installing ri documentation for rspec-2.5.0...
Installing ri documentation for rspec-rails-2.5.0...

推荐答案

我在使用 iTerm2 而不是默认的 OS X Terminal.app 的 Mac OS X 上遇到了类似的问题.iTerm2 没有正确设置 LC_CTYPE,一旦我将 export LC_CTYPE="utf-8" 添加到 ~/.bash_profile,gem 安装就会顺利进行.

I have had a similar issue on my Mac OS X using iTerm2 instead of the default OS X Terminal.app. The LC_CTYPE is not set properly by iTerm2, once I have added export LC_CTYPE="utf-8" to ~/.bash_profile the gem installation goes smoothly.

注意:当然,您可以将导出添加到任何其他 profile 文件

note: of course you can add the export to any of the other profile files

这篇关于Gem 更新:无法转换“xE7"从 ASCII-8BIT 到 UTF-8 到 US-ASCII 转换到 UTF-8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆