plataformatec/simple_form — Issue #361: Heroku - invalid byte sequence in US-ASCII
Author: phstc
Created: 2011-11-11 18:33:42+00:00
State: open

Hello

I'm trying to use simple_form with Twitter Bootstrap, copied the Gemfile from this project

https://github.com/rafaelfranca/simple_form-bootstrap

After I added the simple_form gem, I'm getting this error

/usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/specification.rb:519:in `normalize_yaml_input': invalid byte sequence in US-ASCII (ArgumentError)

--------------------------------

matilde-2:bbtaxi(master>) pablo$ git push heroku master
Counting objects: 1245, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1201/1201), done.
Writing objects: 100% (1245/1245), 2.24 MiB | 595 KiB/s, done.
Total 1245 (delta 576), reused 0 (delta 0)

-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
Fetching source index for http://rubygems.org/
Fetching git://github.com/plataformatec/simple_form.git
Installing rake (0.9.2.2)
Installing abstract (1.0.0)
Installing activesupport (3.0.7)
Installing builder (2.1.2)
Installing i18n (0.5.0)
Installing activemodel (3.0.7)
Installing erubis (2.6.6)
Installing rack (1.2.4)
Installing rack-mount (0.6.14)
Installing rack-test (0.5.7)
Installing tzinfo (0.3.31)
Installing actionpack (3.0.7)
Installing mime-types (1.17.2)
Installing polyglot (0.3.3)
Installing treetop (1.4.10)
Installing mail (2.2.19)
Installing actionmailer (3.0.7)
Installing arel (2.0.10)
Installing activerecord (3.0.7)
Installing activeresource (3.0.7)
Installing bcrypt-ruby (3.0.1) with native extensions
Installing orm_adapter (0.0.5)
Installing warden (1.0.6)
Installing devise (1.4.9)
Installing thor (0.14.6)
Installing railties (3.0.7)
/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 `'
from /usr/ruby1.9.2/bin/bundle:19:in `load'
from /usr/ruby1.9.2/bin/bundle:19:in `

'
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler

To git@heroku.com:bbtaxi.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:bbtaxi.git'

--------------------------------

I tried to add these lines

LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

(Following this post http://www.a.rnaud.net/2011/10/how-to-fix-invalid-byte-sequence-in-us-ascii-in-bundler-installation/)

But I'm still getting the same error. I can't deploy my application. :'(

I created a ticket on Heroku, they answered me

> Hi Pablo,
>
> The source of this error is a character encoding bug in the version of rubygems on this stack. It happens when there are unicode characters in the gemspec, as there are in simple_form:
>
> https://github.com/plataformatec/simple_form/blob/master/simple_form.gemspec
>
> Unfortunately, we may not be able to upgrade rubygems on this stack any time soon, because there are complications that might break a lot of apps. The only current workaround for this would be to fork the gem, remove the unicode characters from the gemspec, and then install from your fork. I'm sorry for the complication here. If you have any questions about doing this, I'd be happy to answer them.
>
> Thanks,
> Matt

Cheers,
Pablo Cantero