user3025407
user3025407

Reputation: 71

Failed push to Heroku

Trying to push to heroku however I get Push rejected, failed to compile ruby app. (see below for details) Any idea where to start? I am thinking I have to start with installing sqlite 1.3.8 gem, however sqlite3 1.3.8 gem is in my local gem list (RVM). Thanks!!!

Ubuntu 13.10 
Ruby 2.0.0
Rails 4.0.2
RVM 1.24.7
Bundler version 1.3.5

vern@vern:~/dev/project1 (master)$ git push heroku master
Warning: Permanently added the RSA host key for IP address '50.19.85.132' to the list of known hosts.
Counting objects: 69, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (57/57), done.
Writing objects: 100% (69/69), 14.86 KiB | 0 bytes/s, done.
Total 69 (delta 8), reused 0 (delta 0)

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
       New app detected loading default bundler cache
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
       Fetching gem metadata from https://rubygems.org/.........
       Fetching gem metadata from https://rubygems.org/..
       Using rake (10.1.0)
       Installing i18n (0.6.9)
       Using minitest (4.7.5)
       Using multi_json (1.8.2)
       Using atomic (1.1.14)
       Using thread_safe (0.1.3)
       Using tzinfo (0.3.38)
       Installing activesupport (4.0.2)
       Using builder (3.1.4)
       Using erubis (2.7.0)
       Using rack (1.5.2)
       Using rack-test (0.6.2)
       Installing actionpack (4.0.2)
       Installing mime-types (1.25.1)
       Using polyglot (0.3.3)
       Using treetop (1.4.15)
       Using mail (2.5.4)
       Installing actionmailer (4.0.2)
       Installing activemodel (4.0.2)
       Using activerecord-deprecated_finders (1.0.3)
       Using arel (4.0.1)
       Installing activerecord (4.0.2)
       Using coffee-script-source (1.6.3)
       Using execjs (2.0.2)
       Using coffee-script (2.2.0)
       Using thor (0.18.1)
       Installing railties (4.0.2)
       Using coffee-rails (4.0.1)
       Using hike (1.2.3)
       Installing jbuilder (1.5.3)
       Using jquery-rails (3.0.4)
       Using json (1.8.1)
       Using bundler (1.3.2)
       Using tilt (1.4.1)
       Installing sprockets (2.10.1)
       Using sprockets-rails (2.0.1)
       Installing rails (4.0.2)
       Using rdoc (3.12.2)
       Using sass (3.2.12)
       Using sass-rails (4.0.1)
       Using sdoc (0.3.20)
       Installing sqlite3 (1.3.8)
       Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
       /tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/ruby-2.0.0/bin/ruby extconf.rb
       checking for sqlite3.h... no
       sqlite3.h is missing. Try 'port install sqlite3 +universal'
       or 'yum install sqlite-devel' and check your shared library search path (the
       location where your sqlite3 shared library is located).
       *** 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=/tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/ruby-2.0.0/bin/ruby
       --with-sqlite3-dir
       --without-sqlite3-dir
       --with-sqlite3-include
       --without-sqlite3-include=${sqlite3-dir}/include
       --with-sqlite3-lib
       --without-sqlite3-lib=${sqlite3-dir}/
       --enable-local
       --disable-local
       Gem files will remain installed in /tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.8 for inspection.
       Results logged to /tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.8/ext/sqlite3/gem_make.out
       An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue.
       Make sure that `gem install sqlite3 -v '1.3.8'` succeeds before bundling.
       Bundler Output: Fetching gem metadata from https://rubygems.org/.........
       Fetching gem metadata from https://rubygems.org/..
       Using rake (10.1.0)
       Installing i18n (0.6.9)
       Using minitest (4.7.5)
       Using multi_json (1.8.2)
       Using atomic (1.1.14)
       Using thread_safe (0.1.3)
       Using tzinfo (0.3.38)
       Installing activesupport (4.0.2)
       Using builder (3.1.4)
       Using erubis (2.7.0)
       Using rack (1.5.2)
       Using rack-test (0.6.2)
       Installing actionpack (4.0.2)
       Installing mime-types (1.25.1)
       Using polyglot (0.3.3)
       Using treetop (1.4.15)
       Using mail (2.5.4)
       Installing actionmailer (4.0.2)
       Installing activemodel (4.0.2)
       Using activerecord-deprecated_finders (1.0.3)
       Using arel (4.0.1)
       Installing activerecord (4.0.2)
       Using coffee-script-source (1.6.3)
       Using execjs (2.0.2)
       Using coffee-script (2.2.0)
       Using thor (0.18.1)
       Installing railties (4.0.2)
       Using coffee-rails (4.0.1)
       Using hike (1.2.3)
       Installing jbuilder (1.5.3)
       Using jquery-rails (3.0.4)
       Using json (1.8.1)
       Using bundler (1.3.2)
       Using tilt (1.4.1)
       Installing sprockets (2.10.1)
       Using sprockets-rails (2.0.1)
       Installing rails (4.0.2)
       Using rdoc (3.12.2)
       Using sass (3.2.12)
       Using sass-rails (4.0.1)
       Using sdoc (0.3.20)
       Installing sqlite3 (1.3.8)
       Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

       /tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/ruby-2.0.0/bin/ruby extconf.rb
       checking for sqlite3.h... no
       sqlite3.h is missing. Try 'port install sqlite3 +universal'
       or 'yum install sqlite-devel' and check your shared library search path (the
       location where your sqlite3 shared library is located).
       *** 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=/tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/ruby-2.0.0/bin/ruby
       --with-sqlite3-dir
       --without-sqlite3-dir
       --with-sqlite3-include
       --without-sqlite3-include=${sqlite3-dir}/include
       --with-sqlite3-lib
       --without-sqlite3-lib=${sqlite3-dir}/
       --enable-local
       --disable-local


       Gem files will remain installed in /tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.8 for inspection.
       Results logged to /tmp/build_15fdd0b4-6d84-4d21-b3db-3d9751c1e7c6/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.8/ext/sqlite3/gem_make.out
       An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue.
       Make sure that `gem install sqlite3 -v '1.3.8'` succeeds before bundling.
 !
 !     Failed to install gems via Bundler.
 !     
 !     Detected sqlite3 gem which is not supported on Heroku.
 !     https://devcenter.heroku.com/articles/sqlite3
 !

 !     Push rejected, failed to compile Ruby app

To [email protected]:intense-shelf-6622.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:intense-shelf-6622.git'
vern@vern:~/dev/project1 (master)$ 

Upvotes: 0

Views: 223

Answers (2)

Vidya
Vidya

Reputation: 30300

Check out these lines from your log:

 !     Detected sqlite3 gem which is not supported on Heroku.
 !     https://devcenter.heroku.com/articles/sqlite3

You need to use Postgres on Heroku for an RDBMS. Or you have options for MongoDB and Neo4J as well for non-relational data stores.

Upvotes: 0

Simone Carletti
Simone Carletti

Reputation: 176342

You can't use SQLite on Heroku, you'll have to use PostgreSQL.

You can set it up to use PostgreSQL on Heroku but SQLite in development, it's a good practice to use the same database in both your development and production environments.

Upvotes: 2

Related Questions