"sqlite3.h" missing when pushing Rails app to Heroku
Heroku uses postgresql so you want to remove sqlite3 or move it into a development group in your Gemfile.
Check you Gemfile.lock for any other gems that may have dependencies on sqlite3, as this can also cause problems.
gem 'sqlite3', :group => [:development, :test]
group :production do
gem 'pg'
end
- edit
Gemfile
as above - remove
Gemfile.lock
- run
bundle install --without production
git add .
git commit -am "bundle updating sqlite3"
git push heroku master
What happened to me was, I was following along the Heroku tutorial and when I used git push heroku master
it was pushing from my latest Git commit (obviously!)
What I forgot was that in the eyes of Git, I was still using sqlite in the gemfile! Silly me!
So I used git add .
followed by a git commit -m "Changed to Postgres."
so Git knew about these changes. Pushing after that worked fine for me.
I had a similar problem and I wasn't even using sqlite3 for anything but after removing it from the gem file I still got that error
what solved it for me was a commit command
git commit -am
that I found on this tutorial