2

I tried to push and i see:

rusik@rusik-K50AF:~/work/ruby/blog3$ git push heroku master Counting
objects: 119, done. Delta compression using up to 2 threads.
Compressing objects: 100% (105/105), done. Writing objects: 100%
(119/119), 31.46 KiB, done. Total 119 (delta 16), 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/
       Installing rake (0.9.2.2) 
       Installing multi_json (1.0.3) 
       Installing activesupport (3.1.1) 
       Installing builder (3.0.0) 
       Installing i18n (0.6.0) 
       Installing activemodel (3.1.1) 
       Installing erubis (2.7.0) 
       Installing rack (1.3.5) 
       Installing rack-cache (1.1) 
       Installing rack-mount (0.8.3) 
       Installing rack-test (0.6.1) 
       Installing hike (1.2.1) 
       Installing tilt (1.3.3) 
       Installing sprockets (2.0.3) 
       Installing actionpack (3.1.1) 
       Installing mime-types (1.17.2) 
       Installing polyglot (0.3.3) 
       Installing treetop (1.4.10) 
       Installing mail (2.3.0) 
       Installing actionmailer (3.1.1) 
       Installing arel (2.2.1) 
       Installing tzinfo (0.3.31) 
       Installing activerecord (3.1.1) 
       Installing activeresource (3.1.1) 
       Installing coffee-script-source (1.1.3) 
       Installing execjs (1.2.9) 
       Installing coffee-script (2.2.0) 
       Installing rack-ssl (1.3.2) 
       Installing json (1.6.1) with native extensions 
       Installing rdoc (3.11) 
       Installing thor (0.14.6) 
       Installing railties (3.1.1) 
       Installing coffee-rails (3.1.1) 
       /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/specification.rb:519:in `normalize_yaml_input': invalid byte sequence in US-ASCII (Argumen
tError)
        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>'
       FAILED: http://devcenter.heroku.com/articles/bundler  !     Heroku push rejected, failed to install gems via Bundler

To [email protected]:furious-river-2242.git  ! [remote rejected] master
-> master (pre-receive hook declined) error: failed to push some refs to '[email protected]:furious-river-2242.git'

So , of'course it looks like this I changed db in gemfile to pg + bundle install and there are no mistakes after bundler. but i see it again . this is my gemfile

source 'http://rubygems.org'

gem 'rails', '3.1.1'

# Bundle edge Rails instead:
# gem 'rails',     :git => 'git://github.com/rails/rails.git'

#gem 'sqlite3'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.1.4'
  gem 'coffee-rails', '~> 3.1.1'
  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

group :production, :staging do
  #gem "mysql2"
  #gem 'sqlite3-ruby', :require => 'sqlite3'
  gem "pg"
end

group :development, :test do
  gem "pg"
  #gem "sqlite3-ruby", :require => "sqlite3"
end

#gem 'ruby-xslt'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

group :test do
  # Pretty printed test output
  gem 'turn', :require => false
end

why?

4
  • Which stack are you using? For 3.1, make sure you have the stack set to cedar. Also, you should just be able to use gem "pg" if postgresql is your dev RDBMS, rather than having them in the group blocks. Just take out the mysql2 and sqlite references.
    – agmcleod
    Nov 23, 2011 at 20:37
  • i use rails 3.1 , i tried mysql , but the error repeated .When i tried bundle install or update there are no mistakes . heroku logs : 2011-11-24T07:46:40+00:00 heroku[slugc]: Slug compilation failed: failed to install gems via Bundler Nov 24, 2011 at 7:50
  • By guess, i think it's failing when trying to install coffee-rails. Can you try installing that separately? gem install coffee-rails
    – agmcleod
    Nov 24, 2011 at 20:06
  • With Rails 3.1 do you even need coffee-rails? Nov 25, 2011 at 11:40

1 Answer 1

1

Can you change for pg and add below line

group :production do
 gem 'pg', '0.12.2'
end

and execute and let me know if you face any problem?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.