Home Technical Articles How-to Articles How do I resolve "unable to convert" messages when updating ruby gems.
How do I resolve "unable to convert" messages when updating ruby gems. PDF Print E-mail
Written by Sam Caldwell   
Wednesday, 17 October 2012 11:54

PROBLEM STATEMENT:

When setting up a ruby on rails environment (see disclamer, below), I encountered errors when running "bundle install" that complained about an inability to convert ASCII-8bit to UTF-8.  The error contained the following common text:

"unable to convert "\xE7" from ASCII-8BIT to UTF-8 for"\

SOLUTION:

Solving the problem was simple, though it appears to confound many so-called rubyists (who appear to be more focused on reinventing the wheel rather than learning the underlying operating systems).

When I executed "locale" I found that LANG was unset. This was fixed by the following--

export "LANG=en_US.UTF-8" >> /etc/profile

. /etc/profile

Problem solved.

DISCLAIMER:

I am not a rubyist.  I still believe we should learn and integrate with the operating system for better performance. Ruby is a neat little language with its uses in systems administration, but if my experience with Rails is any measure of its general performance, I think I'll stick to Python or PHP-based frameworks.

 

Last Updated on Wednesday, 17 October 2012 12:02