12 Mrz 2012

ArgumentError: invalid byte sequence in US-ASCII and bundler

Author: Heiko | Filed under: Rails, Ruby

If you get this error, so bundler can’t find UTF-8 System-ENV-Var (LANG= ; LL_AC=).
Normally you should check it in

/var/lib/locales/supported.d/

if you have all entries in this files. After that you can try to reconfigure all locales

dpkg-reconfigure locales

So if the fix above not working, you can try this workarond:

if RUBY_VERSION =~ /1.9/
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
end

You need to put it on the top of you Gemfile.

And voilà it’s working now :)

Tags: , , ,

3 Responses to “ArgumentError: invalid byte sequence in US-ASCII and bundler”

  1. ascii bilder Says:

    good work! Thanks

  2. mark Says:

    saved me just now
    thanks man

    PS: sad to see that blog posts like yours have better docu than official ruby homepage can offer :(

  3. heiko Says:

    thx :)

Leave a Reply

*