Heroku Push - Error with Git Push to Heroku

I'm getting an error when I try to do a git push to heroku (git push heroku master). I am on cedar stack and my Gemfile specifies sqlite 1.3.5. Here is the error:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/local/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=/usr/local/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}/lib --enable-local --disable-local Gem files will remain installed in /tmp/build_3umr292rjcdek/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5 for inspection. Results logged to /tmp/build_3umr292rjcdek/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5/ext/sqlite3/gem_make.out An error occured while installing sqlite3 (1.3.5), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.3.5'` succeeds before bundling.

! ! Failed to install gems via Bundler. ! ! Heroku push rejected, failed to compile Ruby/rails app


One problem I had which caused hours of headaches was with the 'taps' gem. It was causing pretty much the exact same error for me until I moved it into the 'development' group:

group :production do gem 'taps' gem 'pg' end

Not sure if this is directly applicable to you, but it produced sqlite3 errors until I put taps into :production. Hopefully it'll help someone.

<strong>EDIT</strong>: @cloneofsnake: I don't have enough rep to comment on your answer, but I see you have the 'taps' gem in your Gemfile. Either get rid of it, or put it in the :production group; taps has some dependencies on sqlite3 apparently. I had already switched out sqlite3 for pg, but I was getting the same error as you until I moved 'taps' to production.


Heroku is telling you that you can't compile the sqlite3-ruby gem on the Heroku platform.

You might want to move the sqlite3-ruby gem into a group that isn't installed by default on Heroku.

gem "rails" group :development, :test do gem "sqlite3-ruby", :require => "sqlite3" end group :production do gem "pg" end <hr>

Update: It appears the gem sqlite3-ruby is old and the sqlite3 is the new gem you should use instead.


Take a look which branch you are trying to push. In my case I was working on dev branch, and trying to push using:

$ git push heroku master

What git does is pushing my master branch to heroku but my master branch was using sqlite3, causing this weird error.

Try do do:

$ git push heroku [name_of_your_branch]:master


Make sure you have the necessary gems in production. I recently had this problem myself. Also try using gem 'pg' (POSTGRESQL) instead of sqlite as thats what Heroku uses.


group :production do gem 'pg' gem 'carrierwave' gem 'rmagick' gem 'heroku' gem 'git-rails' gem "jquery-rails" gem 'hoe', '~> 1.5.1' gem "RedCloth" gem 'i18n' end


  • After upgrading to macOS Mojave gem update is failing
  • libxml2 is missing error
  • Installing Ruby Gem on Raspbian Error: Failed to Build Gem Native Extension
  • Accesing properties in a UserControl from the MainWindow (WPF/MVVM)
  • Scala Slick Database Views
  • Is it possible to access raw iphone audio output?
  • No rows to manipulate in html table created with jQuery csvToTable?
  • include dlls in visual studio c++ 2008
  • react split panel resize
  • Can you pass an array from javascript to asp.net mvc controller action without using a form?
  • C# - Most efficient way to iterate through multiple arrays/list
  • Consuming a WCF service in a Java Client using wsHttpBinding
  • Trying to get the char code of ENTER key
  • Using Sax parsing to edit and write XML in VB6
  • Selenium to click on a javascript button corresponding to a text
  • Debug.DrawLine not showing in the GameView
  • Content-Length header not returned from Pylons response
  • Yii2: Config params vs. const/define
  • Google Custom Search with transparent background
  • How to avoid particles glitching together in an elastic particle collision simulator?
  • Recording logins for password protected directories
  • Insert into database using onclick function
  • Splitting given String into two variables - php
  • What is Eclipse's Declaration View used for?
  • Check if a string to interpolate provides expected placeholders
  • How to apply VCL Styles to DLL-based forms in Inno Setup?
  • Can I make an Android app that runs a web view in Chrome 39?
  • Can a Chrome extension content script make an jQuery AJAX request for an html file that is itself a
  • Upload files with Ajax and Jquery
  • Timeout for blocking function call, i.e., how to stop waiting for user input after X seconds?
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • SetUp method failed while running tests from teamcity
  • AngularJs get employee from factory
  • Proper way to use connect-multiparty with express.js?
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • What are the advantages and disadvantages of reading an entire file into a single String as opposed
  • coudnt use logback because of log4j
  • Can't mass-assign protected attributes when import data from csv file