0
 Results logged to /tmp/build_207lfem2op1z3/vendor/bundle/ruby/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out
       An error occurred while installing linecache19 (0.5.12), and Bundler cannot continue.
       Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling.
 !
 !     Failed to install gems via Bundler.
 !
 !     Heroku push rejected, failed to compile Ruby/rails app

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

So please help me in solving this Iam new to Heroku and Ruby on rails

I have followed the following steps to update my app git init git add. git commit -m '.' git push heroku master

And I have got the following run error

 saasbook@saasbook:~/hw2_rottenpotatoes$ git push heroku master
Counting objects: 462, done.
Compressing objects: 100% (240/240), done.
Writing objects: 100% (462/462), 76.71 KiB, done.
Total 462 (delta 185), reused 427 (delta 172)

-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.2.1
       Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
       Fetching gem metadata from http://rubygems.org/.........
       Fetching gem metadata from http://rubygems.org/..
       Installing rake (0.9.2.2)
       Installing multi_json (1.0.4)
       Installing activesupport (3.1.0)
       Installing bcrypt-ruby (3.0.1) with native extensions
       Installing builder (3.0.0)
       Installing i18n (0.6.0)
       Installing activemodel (3.1.0)
       Installing erubis (2.7.0)
       Installing rack (1.3.6)
       Installing rack-cache (1.0.3)
       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.0)
       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.0)
       Installing arel (2.2.1)
       Installing tzinfo (0.3.31)
       Installing activerecord (3.1.0)
       Installing activeresource (3.1.0)
       Installing archive-tar-minitar (0.5.2)
       Installing coffee-script-source (1.2.0)
       Installing execjs (1.2.13)
       Installing coffee-script (2.2.0)
       Installing rack-ssl (1.3.2)
       Installing json (1.6.5) with native extensions
       Installing rdoc (3.12)
       Installing thor (0.14.6)
       Installing railties (3.1.0)
       Installing coffee-rails (3.1.1)
       Installing columnize (0.3.6)
       Installing haml (3.1.4)
       Installing jquery-rails (1.0.19)
       Installing libv8 (3.3.10.4)
       Installing ruby_core_source (0.1.5)
       Installing linecache19 (0.5.12) with native extensions
       Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
       /usr/local/bin/ruby extconf.rb
       checking for vm_core.h... no
       checking for vm_core.h... no
       *** extconf.rb failed ***
       Could not create Makefile due to some reason, probably lack of
       necessary libraries and/or headers.  Check the mkmf.log file for more
       details.  You may need configuration options.
       Provided configuration options:
       --with-opt-dir
       --without-opt-dir
       --with-opt-include
       --without-opt-include=${opt-dir}/include
       --with-opt-lib
       --without-opt-lib=${opt-dir}/lib
       --with-make-prog
       --without-make-prog
       --srcdir=.
       --curdir
       --ruby=/usr/local/bin/ruby
       --with-ruby-dir
       --without-ruby-dir
       --with-ruby-include
       --without-ruby-include=${ruby-dir}/include
       --with-ruby-lib
       --without-ruby-lib=${ruby-dir}/lib
       /usr/local/lib/ruby/1.9.1/fileutils.rb:243:in `mkdir': Read-only file system - /usr/local/include/ruby-1.9.1/ruby-1.9.2-p290 (Errno::EROFS)
       from /usr/local/lib/ruby/1.9.1/fileutils.rb:243:in `fu_mkdir'
       from /usr/local/lib/ruby/1.9.1/fileutils.rb:217:in `block (2 levels) in mkdir_p'
       from /usr/local/lib/ruby/1.9.1/fileutils.rb:215:in `reverse_each'
       from /usr/local/lib/ruby/1.9.1/fileutils.rb:215:in `block in mkdir_p'
       from /usr/local/lib/ruby/1.9.1/fileutils.rb:201:in `each'
       from /usr/local/lib/ruby/1.9.1/fileutils.rb:201:in `mkdir_p'
       from /tmp/build_lt34ecl4ewpm/vendor/bundle/ruby/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:59:in `block in create_makefile_with_core'
       from /usr/local/lib/ruby/1.9.1/tempfile.rb:320:in `open'
       from /tmp/build_lt34ecl4ewpm/vendor/bundle/ruby/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:51:in `create_makefile_with_core'
       from extconf.rb:19:in `<main>'
       Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
       Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz
       Gem files will remain installed in /tmp/build_lt34ecl4ewpm/vendor/bundle/ruby/1.9.1/gems/linecache19-0.5.12 for inspection.
       Results logged to /tmp/build_lt34ecl4ewpm/vendor/bundle/ruby/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out
       An error occurred while installing linecache19 (0.5.12), and Bundler cannot continue.
       Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling.
 !
 !     Failed to install gems via Bundler.
 !
 !     Heroku push rejected, failed to compile Ruby/rails app

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

Below Iam posting my Gem file

source 'http://rubygems.org'

gem 'rails', '3.1.0'

# 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 'therubyracer'              
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  gem 'uglifier'
end

gem 'jquery-rails'

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

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
gem 'ruby-debug19', :require => 'ruby-debug'
gem 'haml'
user1660130
  • 43
  • 1
  • 8

2 Answers2

0

An error occurred while installing linecache19 (0.5.12), and Bundler cannot continue.

Typically you will only have ruby-debug gem in use in development, not in production. Make sure ruby-debug is in the :development or :test group in your Gemfile.

group :development, :test do
  gem 'ruby-debug19', :require => 'ruby-debug'
end

Then try the following

  1. Run bundle again
  2. Commit your Gemfile and Gemfile.lock
  3. Push to Heroku again
deefour
  • 34,974
  • 7
  • 97
  • 90
  • I can't really help you further if you don't provide details about what's going wrong. – deefour Oct 26 '12 at 15:43
  • Hi I have posted my Gem file and still more If you need any just ask me . Please help me in solving this – user1660130 Oct 26 '12 at 16:28
  • I updated my answer for you - Replace the 2nd to last line in your Gemfile with the code block in my answer above, re-bundle, commit, and push. – deefour Oct 26 '12 at 16:33
0

linecache19 is installed as a dependency of ruby-debug19, which you don't want to have in production anyway.

In your Gemfile, replace the line that says

gem 'ruby-debug19', :require => 'ruby-debug'

with this

group :development, :test do
  gem 'ruby-debug19', require: 'ruby-debug'
end

which will mean that the debugger is only loaded in the development and test environments.

You're also going to run into trouble with sqlite3 which is not supported on Heroku either... see this question

Community
  • 1
  • 1
Andrew Haines
  • 6,574
  • 21
  • 34