_ _ _ _ _____ _ ___ _ _| |_ _ _ _| |_ _ _ _ _ _ _ _ _ _ _____ _____ _____ _____ _____ _____ _____ _| |_ _ _ _| |_ _ _ _ _ _ _ _ _ _ _ _ | | | ___ _ _ _ | |_ ___ | _||_| _ _ | __|| | ___ ___ _ _ ___ |_|| __| ___ | |_ ___ ___ |_||_| ___ _ _ ___ | ||_| _| | | |_ _ _ | |_ ___ ___ ___ ___ _ _ ___ ___ ___ ___ |_| ___ | | || __| ___ | _ || __|| || || || __| ___ | |_ ___ ___ |_|| __| ___ ___ ___ _ _ ___ |_| |_| ___ | |_ _ _ ___ _| || | ___ ___ |_| ___ ___ | |_ ___ | || | ___ | |_ |_| ___ ___ | || . || | | | | _|| . | | _|| ||_'_| | __|| || .'|| . || | || . | _ | __|| || . ||_ -|| . | _ | || || | || .'|| || || . | | . || | || _|| -_| |_ -|| -_|| . || | || -_|| || _|| -_| | || | | | ||__ ||___|| ||__ || --||- -||- -|| __|| || . ||_ -|| . | _ | __|| _|| .'|| . || | || . | _ | || | | . || | || || . || || -_|| _| | || ||_ -|| _|| .'|| || || .'|| _|| || . || | |__|__||___||_____| |_| |___| |_| |_||_,_| |_ _||_||__,||_ ||___||___|| ||_ _||_|_||___||___|| _|| ||_||_|_| \_/ |__,||_||_||___| |___||_ ||_| |___| |___||___||_ ||___||___||_|_||___||___| |_||_|_| |_____||_____| |__|__||_____||_____||_____||_____||_ _||_|_||___||___|| _|| ||_ _||_| |__,||_ ||___||___|| | |_||_|_| |___||___||_|_||___||_||___||_| |_||_|_||___||_| |__,||_||_||__,||_| |_||___||_|_| |_| |_| |_| |_| |_| |_| |___| |_| |_| |_| |_| |_| |_| |_|
Samedi, octobre 1st, 2011When trying to push to Heroku I came accross this nasty bug :
/usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/specification.rb:519:in `normalize_yaml_input': invalid byte sequence in US-ASCII (ArgumentError)
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/specification.rb:479:in `from_yaml'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:183:in `load_gemspec'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:51:in `block in initialize'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_reader.rb:64:in `block in each'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_reader.rb:55:in `loop'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_reader.rb:55:in `each'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:32:in `initialize'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:17:in `new'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package/tar_input.rb:17:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/package.rb:58:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/format.rb:63:in `from_io'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/format.rb:51:in `block in from_file_by_path'
from /usr/ruby1.9.2/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/format.rb:50:in `from_file_by_path'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/source.rb:72:in `fetch'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:45:in `block in run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `block in each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/bin/bundle:13:in `<top (required)>'
from /usr/ruby1.9.2/bin/bundle:19:in `load'
from /usr/ruby1.9.2/bin/bundle:19:in `<main>'
Basically it is saying that one of the Gemspec of one of my gems in containing UTF8 characters and so the slug compilation can’t go forward. Even by adding LANG = « en_US.UTF-8″ to the heroku config vars.
What did the trick was to add these two lines to the Gemfile :
LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8"
I didn’t know that a Gemfile could contain ruby code and get evaluated, there you go.