39

I am installing ruby on rails 4.0.0 on my linux system , but i am getting this kind of errors unable to convert "\x89" from ASCII-8BIT to UTF8 for guides/assets/images/getting_started/routing_error_no_route_matches.png, skipping and many similar errors , i read here that it won't cause any effect ,but i do not understand why it is coming . Any pointers?

2
  • skipping is not part of the error.
    – sawa
    Commented Aug 14, 2013 at 15:33
  • 3
    What do you mean "skipping" isn't part of the error? It's part of the error output. Commented Oct 1, 2013 at 2:36

3 Answers 3

44

You need to update / install a version of the rdoc gem that supports the conversion. Then these errors won't appear during generation of the documentation when you install rails or when you regenerate the documentation.

gem install rdoc

Then to regenerate the documentation

gem rdoc --all --overwrite
2
  • 6
    As a general practice, it's a good idea to gem update --system and gem update before installing additional gems. Commented Feb 9, 2014 at 23:54
  • sudo gem update --system && sudo gem update && sudo gem install rdoc && sudo gem rdoc --all --overwrite; worked well for me; whereas setting/exporting/changing environment variables did not.
    – voices
    Commented Nov 25, 2015 at 6:32
6

Set such environment variables before you do install:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
1

If you prefer using online documentation to using rdoc and ri, then you can avoid these errors and speed up your installs by skipping the rdoc and ri installations. Michael Hartl recommends this in his book. Just add a .gemrc file to your home directory with the following contents:

install: --no-rdoc --no-ri
update: --no-rdoc --no-ri

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.