0
votes

I am new to the rails and I am trying to push an app to heroku (just some basic stuff for practice) I have looked at the some of the solution to sqlite3 error problem on stackoverflow and I have followed them but nothing has worked for me so far. I get the following error when I issue git push heroku master from the Windows command line:

   **Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native ex

tension. /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 *

   .
   .
   .
   .
   .
          An error occurred while installing sqlite3 (1.3.7), and Bundler cannot co

ntinue. Make sure that gem install sqlite3 -v '1.3.7' succeeds before bundling.

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

My gemfile looks like this:

source 'https://rubygems.org'

gem 'rails', '3.2.3'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

#gem 'sqlite3'

group :development, :test do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
end
1
after adding the gem, did you run bundle install? Did you do git add for the gemfile and commit your changes properly?abhir
bingo! That fixed the problem Abhir. git add Gemgfile was the issue. Thanks a lot, Prakash for editing the code!Qufr kaifi

1 Answers

0
votes

next time you build a new app to get rid of all the fuss you must do the following: rails new -d postgresql ,if u don't have heroku addons installed do this heroku addons:add heroku_postgresql:hobby-dev ,next heroku addons | grep POSTGRES and finally heroku run rake db:migrate ,that should be it.