2

This topic has been covered already and have some answers but those answers didn't solve my problem. I have looked over every possible solutions in this site but didn't help.

This is my gem file:

group :development, :test do
    gem 'rspec-rails'
    gem 'sqlite3'
end

group :production do
    gem 'pg'
end

and ran : git push heroku master

but the same problem:

Installing sqlite3 (1.3.8)
       Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

       /tmp/build_ad3d04d2-25b4-44b5-a603-340e43a2b930/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_ad3d04d2-25b4-44b5-a603-340e43a2b930/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_ad3d04d2-25b4-44b5-a603-340e43a2b930/vendor/bundle/ruby/2.0.0/gems/sqlite3-1.3.8 for inspection.
       Results logged to /tmp/build_ad3d04d2-25b4-44b5-a603-340e43a2b930/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/Rails app
Tushar Khatiwada
  • 2,019
  • 2
  • 20
  • 32
  • Is that your full gemfile? Do you have any uncommitted changes? Check with `git status`, it should show working directory clean. – Chris Hanson Sep 22 '13 at 04:39
  • @Chris: This is my full gem file. Commented Line has not been included.: `source 'https://rubygems.org' gem 'rails', '3.2.13' group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' # gem 'therubyracer', :platforms => :ruby gem 'uglifier', '>= 1.0.3' end gem 'jquery-rails' gem 'unicorn' group :development, :test do gem 'rspec-rails' gem 'sqlite3' end group :production do gem 'pg' end` – Tushar Khatiwada Sep 22 '13 at 05:16
  • @Chris: This is the output of the git status:`# On branch master # Changes not staged for commit: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # # modified: Gemfile # modified: Gemfile.lock # no changes added to commit (use "git add" and/or "git commit -a")` – Tushar Khatiwada Sep 22 '13 at 05:18

1 Answers1

6

You have made changes to your gem file, but they have not been committed.

Do

git commit -am 'Update gemfile'

Then

git push heroku master

Should work.

Let me know how you go.

Chris Hanson
  • 721
  • 6
  • 12
  • Thank you, It succeeded with some DEPRECATION Warning. I think that doesn't matter coz it worked. I did `git commit -m ""` previously instead of your suggestion `git commit -am ""` according to the guide. Anyway What is the difference between those two? – Tushar Khatiwada Sep 22 '13 at 05:30
  • You did not stage your changes before committing. `git commit -am` is a shortcut to stage and commit modified files. You can do the same thing by going `git add ` then `git commit -m 'Message'`. If you have untracked files, `git commit -am` will not add them to git. You will need to manually add them first `git add `. Glad I could help. – Chris Hanson Sep 22 '13 at 05:39