Devise: invalid byte sequence in US-ASCII during `bundle install` to install from git master branch

Created on 10 Mar 2011  路  9Comments  路  Source: heartcombo/devise

Using devise (1.2.rc) from git://github.com/plataformatec/devise.git (at master) /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:733:in gsub': invalid byte sequence in US-ASCII (ArgumentError) from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:733:into_yaml'
from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:78:in block (2 levels) in write_package' from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:73:inblock (3 levels) in add_gem_contents'
from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_writer.rb:83:in new' from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:67:inblock (2 levels) in add_gem_contents'
from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:65:in wrap' from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:65:inblock in add_gem_contents'
from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_writer.rb:113:in add_file' from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:63:inadd_gem_contents'
from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:31:in open' from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:68:inopen'
from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:77:in block in write_package' from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:35:inopen'
from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/open-uri.rb:35:in open' from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:76:inwrite_package'
from /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:39:in build' from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/source.rb:438:inblock in generate_bin'
from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/source.rb:438:in chdir' from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/source.rb:438:ingenerate_bin'
from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/source.rb:547:in install' from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/installer.rb:55:inblock in run'
from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in block in each' from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:ineach'
from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in each' from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/installer.rb:44:inrun'
from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in install' from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/cli.rb:226:ininstall'
from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in run' from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:ininvoke_task'
from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in dispatch' from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:instart'
from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/gems/bundler-1.0.10/bin/bundle:13:in <top (required)>' from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/bin/bundle:19:inload'
from /usr/local/rvm/gems/ruby-1.9.2-p136@goodbrews/bin/bundle:19:in `

'

Most helpful comment

I had this issue too and the solution was to set some more environment variables:

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

(this link helped me: http://www.thomas-krenn.com/de/wiki/Perl_warning_Setting_locale_failed_unter_Debian)

All 9 comments

I am attempting to launch my rails app on a linode running Ubuntu 10.04 LTS. Let me know if you need any other info.

Ugh, forgot to set my system's locale. I feel dumb. If anybody else stumbles across this and is curious, sudo vim /etc/default/locale and add

LANG="en_us.UTF-8"

Log out, log in, boom.

hi.
I get this error to.
I checked for valid locales: everything seems to be in place.

bundler 1.0.15
devise master, git
rails 3.1
utf-8 locales

but still:

~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:733:in gsub': invalid byte sequence in US-ASCII (ArgumentError) ~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:733:into_yaml'
~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:78:in block (2 levels) in write_package' ~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:73:inblock (3 levels) in add_gem_contents'
~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_writer.rb:83:in new' ~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:67:inblock (2 levels) in add_gem_contents'
~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:65:in wrap' ~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:65:inblock in add_gem_contents'
~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_writer.rb:113:in add_file' ~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:63:inadd_gem_contents'
~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_output.rb:31:in open' ~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/package.rb:68:inopen'
~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:77:in block in write_package' ~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/1.9.1/open-uri.rb:35:inopen'
~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/1.9.1/open-uri.rb:35:in open' ~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:76:inwrite_package'
~/.rvm/rubies/ruby-1.9.2-p180-patched/lib/ruby/site_ruby/1.9.1/rubygems/builder.rb:39:in build' ~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/source.rb:450:inblock in generate_bin'
~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/source.rb:450:in chdir' ~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/source.rb:450:ingenerate_bin'
~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/source.rb:559:in install' ~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/installer.rb:58:inblock (2 levels) in run'
~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:93:in with_build_args' ~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/installer.rb:57:inblock in run'
~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in block in each' ~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:ineach'
~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in each' ~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/installer.rb:49:inrun'
~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in install' ~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/cli.rb:222:ininstall'
~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in run' ~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:ininvoke_task'
~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in dispatch' ~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:instart'
~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/gems/bundler-1.0.15/bin/bundle:13:in <top (required)>' ~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/bin/bundle:19:inload'
~/.rvm/gems/ruby-1.9.2-p180-patched@rails-3-1/bin/bundle:19:in `

'

did anyone resolved this issue?
how to fix this error?

See my second comment above, Mehonoshin. That's what fixed it for me

The file should be named "/etc/default/locale" not "/etc/default/local"

Yep, sorry, that was a typo.

Had same issue on ubuntu 10.04 and adding /etc/default/locale file did not work. But this command did work: sudo update-locale LANG=en_US.UTF-8.

I had this issue too and the solution was to set some more environment variables:

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

(this link helped me: http://www.thomas-krenn.com/de/wiki/Perl_warning_Setting_locale_failed_unter_Debian)

Was this page helpful?
0 / 5 - 0 ratings