Bundle Install failing on deployment

Hi,

I have upgraded an app to 3.1.0.rc5 and everything is fine locally.
When I try to deploy with capistrano, bundle install fails with the
following output:

** [out :: westminster-agency.co.uk] Fetching source index for
http://rubygems.org/
** [out :: westminster-agency.co.uk] which: no sudo in (/usr/local/
sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin)
** [out :: westminster-agency.co.uk] Using rake (0.9.2)
** [out :: westminster-agency.co.uk] Using multi_json (1.0.3)
** [out :: westminster-agency.co.uk] Using activesupport (3.1.0.rc5)
** [out :: westminster-agency.co.uk] Using bcrypt-ruby (2.1.4)
** [out :: westminster-agency.co.uk] Using builder (3.0.0)
** [out :: westminster-agency.co.uk] Using i18n (0.6.0)
** [out :: westminster-agency.co.uk] Using activemodel (3.1.0.rc5)
** [out :: westminster-agency.co.uk] Using erubis (2.7.0)
** [out :: westminster-agency.co.uk] Using rack (1.3.2)
** [out :: westminster-agency.co.uk] Using rack-cache (1.0.2)
** [out :: westminster-agency.co.uk] Using rack-mount (0.8.1)
** [out :: westminster-agency.co.uk] Using rack-test (0.6.1)
** [out :: westminster-agency.co.uk] Using hike (1.2.0)
** [out :: westminster-agency.co.uk] Using tilt (1.3.2)
** [out :: westminster-agency.co.uk] Using sprockets (2.0.0.beta.13)
** [out :: westminster-agency.co.uk] Using actionpack (3.1.0.rc5)
** [out :: westminster-agency.co.uk] Using mime-types (1.16)
** [out :: westminster-agency.co.uk] Using polyglot (0.3.2)
** [out :: westminster-agency.co.uk] Using treetop (1.4.10)
** [out :: westminster-agency.co.uk] Using mail (2.3.0)
** [out :: westminster-agency.co.uk] Using actionmailer (3.1.0.rc5)
** [out :: westminster-agency.co.uk] Using arel (2.1.4)
** [out :: westminster-agency.co.uk] Using tzinfo (0.3.29)
** [out :: westminster-agency.co.uk] Using activerecord (3.1.0.rc5)
** [out :: westminster-agency.co.uk] Using activeresource (3.1.0.rc5)
** [out :: westminster-agency.co.uk] Using addressable (2.2.6)
** [out :: westminster-agency.co.uk] Using ansi (1.3.0)
** [out :: westminster-agency.co.uk] Using bcat (0.6.1)
** [out :: westminster-agency.co.uk] Using ffi (1.0.9)
** [out :: westminster-agency.co.uk] Using childprocess (0.2.0)
** [out :: westminster-agency.co.uk] Using diff-lcs (1.1.2)
** [out :: westminster-agency.co.uk] Using json (1.5.3)
** [out :: westminster-agency.co.uk] /usr/local/lib/ruby/site_ruby/
1.9.1/rubygems/specification.rb:575:in normalize_yaml_input': invalid byte sequence in US-ASCII (ArgumentError ** [out :: westminster-agency.co.uk] ) ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/ site_ruby/1.9.1/rubygems/specification.rb:487:in from_yaml’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/
site_ruby/1.9.1/rubygems/package/tar_input.rb:190:in load_gemspec' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/ site_ruby/1.9.1/rubygems/package/tar_input.rb:55:in block in
initialize’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/
site_ruby/1.9.1/rubygems/package/tar_reader.rb:64:in block in each' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/ site_ruby/1.9.1/rubygems/package/tar_reader.rb:55:in loop’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/
site_ruby/1.9.1/rubygems/package/tar_reader.rb:55:in each' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/ site_ruby/1.9.1/rubygems/package/tar_input.rb:35:in initialize’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/
site_ruby/1.9.1/rubygems/package/tar_input.rb:20:in new' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/ site_ruby/1.9.1/rubygems/package/tar_input.rb:20:in open’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/
site_ruby/1.9.1/rubygems/package.rb:44:in open' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/ site_ruby/1.9.1/rubygems/format.rb:62:in from_io’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/
site_ruby/1.9.1/rubygems/format.rb:46:in block in from_file_by_path' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/1.9.1/ open-uri.rb:35:in open’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/1.9.1/
open-uri.rb:35:in open' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/ site_ruby/1.9.1/rubygems/format.rb:45:in from_file_by_path’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/
1.9.1/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:100:in
spec_from_gem' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/ 1.9.1/gems/bundler-1.0.15/lib/bundler/source.rb:77:in fetch’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/
1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:50:in block in run' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/ 1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in block in
each’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/
1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in each' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/ 1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in each’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/
1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:49:in run' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/ 1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in install’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/
1.9.1/gems/bundler-1.0.15/lib/bundler/cli.rb:222:in install' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/ 1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in run’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/
1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:in
invoke_task' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/ 1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in dispatch’
** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/
1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:in
start' ** [out :: westminster-agency.co.uk] from /usr/local/lib/ruby/gems/ 1.9.1/gems/bundler-1.0.15/bin/bundle:13:in <top (required)>’
** [out :: westminster-agency.co.uk] from /usr/local/bin/bundle:19:in
load' ** [out :: westminster-agency.co.uk] from /usr/local/bin/bundle:19:in
command finished in 41668ms
*** [deploy:update_code] rolling back

I have googled around and from what I have been able to uncover, it
appears to be a bug in RubyGems to do with parsing YAML, but I haven’t
changed the version of RubyGems on the server (so not sure if my
assumptions are correct), it was 1.8.3 I think, so I upgraded to the
latest version (1.8.7) and it still errors out - I was able to deploy
fine at rails 3.0.9 last week.

As you can see from the output, rails 3.1.0.rc5 installed fine, it
appears to be failing on one particular gem, but I can’t tell which.
If it is related to a particular gem, I was going to try installing it
on its own, to see if that helps bundler.

I need 3.1.0 so would be grateful of any pointers so I can get this
sorted. I will look into using RVM on the server, but would like to
know what the issues are here if anyone can help, rather than ignore
or gloss over it.

Ruby 1.9.2-p136
Server OS: Centos 5
Bundler: 1.0.15
RubyGem: 1.8.7

Thanks

Paul

I have the same error even locally on Rails 3.0.9:

/Users/sekrett/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:540:in
`normalize_yaml_input’: invalid byte sequence in US-ASCII
(ArgumentError)

mac os x 10.5.8
ruby 1.9.2-p290
bundler 1.0.17
rubygems 1.8.7

Ok, here is the solution, that worked for me:
gem ‘gherkin’, ‘2.4.5’

On Aug 10, 9:20am, Alexander Z. [email protected] wrote:

Ok, here is the solution, that worked for me:
gem ‘gherkin’, ‘2.4.5’

Thanks Alexander, but no luck. Still errors out on the server.

I get no problems locally on my mac with the same ruby, bundler and
ruby gems versions as you, this only happens on the server.

Will keep investigating.

On Aug 11, 3:39pm, paul h [email protected] wrote:

Will keep investigating.
Found the problem - aruba 0.4.6. Fixing it at 0.4.5 solves the
problem.

I also tried upgrading gherkin to 2.4.6, and got the same errors,
fixing it at 2.4.5 as per Alexanders post solves that one, so there
must be issues with aruba 0.4.6 and gherkin 2.4.6.

I had the same error with 2.4.15, but defining the $LANG env var before
running bundle solved the issue:

export LANG=en_US.UTF-8