Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
249 views
in Technique[技术] by (71.8m points)

ruby on rails - Gem update: unable to convert "xE7" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to 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...
question from:https://stackoverflow.com/questions/4975973/gem-update-unable-to-convert-xe7-to-utf-8-in-conversion-from-ascii-8bit-to-u

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...