title: Heroku push failing, perhaps timeout from rubygems
body: <p>I'm trying to push to heroku using</p>
  
  <pre><code>git push heroku master
  </code></pre>
  
  <p>It gets stuck when trying to access rubygems:</p>
  
  <pre><code>    -&gt; Heroku receiving push 
  -----&gt; Removing .DS_Store files 
  -----&gt; Ruby/Rails app detected 
  -----&gt; Installing dependencies using Bundler version 1.1.rc.5 
  Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ 
  Fetching gem metadata from http://rubygems.org/....... 
  /app/slug-compiler/lib/utils.rb:62:in `block (2 levels) in spawn': command='/app/slug-compiler/lib/../buildpacks/ruby/bin/compile /tmp/build_38k3w88w3yxzg /app/tmp/repo.git/.cache' exit_status=0 out='' event=timeout elapsed=596.7476198673248 (Utils::TimeoutError) 
  from /app/slug-compiler/lib/utils.rb:48:in `loop' 
  from /app/slug-compiler/lib/utils.rb:48:in `block in spawn' 
  from /app/slug-compiler/lib/utils.rb:44:in `popen' 
  from /app/slug-compiler/lib/utils.rb:44:in `spawn' 
  from /app/slug-compiler/lib/buildpack.rb:35:in `block in compile' 
  from /app/slug-compiler/lib/buildpack.rb:33:in `fork' 
  from /app/slug-compiler/lib/buildpack.rb:33:in `compile' 
  from /app/slug-compiler/lib/slug.rb:464:in `block in run_buildpack' 
  from /app/slug-compiler/lib/utils.rb:117:in `log' 
  from /app/slug-compiler/lib/slug.rb:702:in `log' 
  from /app/slug-compiler/lib/slug.rb:463:in `run_buildpack' 
  from /app/slug-compiler/lib/slug.rb:107:in `block (2 levels) in compile' 
  from /app/slug-compiler/lib/utils.rb:98:in `block in timeout' 
  from /usr/local/lib/ruby/1.9.1/timeout.rb:58:in `timeout' 
  from /app/slug-compiler/lib/utils.rb:98:in `rescue in timeout' 
  from /app/slug-compiler/lib/utils.rb:93:in `timeout' 
  from /app/slug-compiler/lib/slug.rb:96:in `block in compile' 
  from /app/slug-compiler/lib/utils.rb:117:in `log' 
  from /app/slug-compiler/lib/slug.rb:702:in `log' 
  from /app/slug-compiler/lib/slug.rb:95:in `compile' 
  from /app/slug-compiler/bin/slugc:85:in `block in &lt;main&gt;' 
  from /app/slug-compiler/lib/slug.rb:472:in `block in lock' 
  from /app/slug-compiler/lib/repo_lock.rb:44:in `call' 
  from /app/slug-compiler/lib/repo_lock.rb:44:in `run' 
  from /app/slug-compiler/lib/slug.rb:472:in `lock' 
  from /app/slug-compiler/bin/slugc:66:in `&lt;main&gt;' 
  ! Heroku push rejected, failed to compile Ruby/rails app
  
  To git@heroku.com:[app].git 
  ! [remote rejected] master -&gt; master (pre-receive hook declined) 
  error: failed to push some refs to 'git@heroku.com:[app].git'
  </code></pre>
  
  <p>this is my gemfile</p>
  
  <pre><code>    source 'http://rubygems.org'
  
  gem 'rails'
  
  
  # Bundle edge Rails instead:
  # gem 'rails', :git =&gt; 'git://github.com/rails/rails.git'
  
  gem 'sqlite3-ruby', :group =&gt; :development
  gem 'gravatar_image_tag'
  gem 'acts_as_follower', "~&gt; 0.1.1"
  
  group :development do
  gem 'rspec-rails'
  gem 'annotate' 
  end
  
  gem 'faker'
  gem 'pg' 
  gem 'jquery-rails'
  
  gem 'thumbs_up'
  gem 'kaminari'
  
  group :test do
  gem 'rspec'
  gem 'webrat'
  gem 'factory_girl_rails'
  
  end
  
  gem 'therubyracer', :platforms =&gt; :ruby
  gem 'execjs', "~&gt; 1.2.9"
  
  gem 'activeadmin'
  gem 'meta_search'
    gem 'sass-rails'
  group :assets do
  
   gem 'coffee-rails'
    gem 'uglifier'
  end
  
  # Use unicorn as the web server
  # gem 'unicorn'
  
  # Deploy with Capistrano
  # gem 'capistrano'
  
  # To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
  # gem 'ruby-debug'
  # gem 'ruby-debug19', :require =&gt; 'ruby-debug'
  
  # Bundle the extra gems:
  # gem 'bj'
  # gem 'nokogiri'
  # gem 'sqlite3-ruby', :require =&gt; 'sqlite3'
  # gem 'aws-s3', :require =&gt; 'aws/s3'
  
  # Bundle gems for the local environment. Make sure to
  # put test-only gems in this group so their generators
  # and rake tasks are available in development mode:
  # group :development, :test do
  #   gem 'webrat'
  # end
  </code></pre>
  
  <p>This never happened before.
  The change in the gemfile was that I added acts_as_follower. All gems are updated using bundle update
  What can I do to fix this?</p>
  
  <p><strong>Update</strong>:
  I also tested <code>heroku run bundle update</code> and it stalls as well...</p>
  
  <p><strong>Update 2:</strong>
  I now get</p>
  
  <pre><code>&gt;git push heroku master
  Enter passphrase for key '/c/Users/Me/.ssh/id_rsa':
  Counting objects: 214, done.
  Delta compression using up to 4 threads.
  Compressing objects: 100% (182/182), done.
  Read from remote host heroku.com: Connection reset by peer
  fatal: sha1 file '&lt;stdout&gt;' write error: Invalid argument
  error: failed to push some refs to 'git@heroku.com:[app].git'
  </code></pre>