Not able to create staging instance on heroku

This question already has an answer here:

  • Errors of pushing rails app to Heroku error occurred while installing sqlite3, and Bundler cannot continue [duplicate]

    3 answers

  • How do I git rebase the first commit?
  • How to avoid tons of commits when debugging Heroku app
  • How do I handle two separate yet very similar code-bases with git /github?
  • How to git checkout a remote branch named the same as a directory?
  • How to detach subdirectory in Git but keep all branches
  • Cannot push to Heroku 'fatal: unable to access..Could not resolve host: (nil); nodename nor servname provided, or not known'
  • Git and changelog guideline
  • github linking with other repos
  • How do I resolve this issue of preventing push to origin wrt. GitHub?
  • Separate files in Git
  • How to merge head commits from another branch?
  • git commit --amend without asking for message
  • 2 Solutions collect form web for “Not able to create staging instance on heroku”

    In your Gemfile

    group :production do
      gem 'pg', '0.17.1'
      gem 'rails_12factor', '0.0.2’
    end
    

    and also remove gem ‘sqlite3’ OR

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

    Because heroku can’t install the sqlite3 gem. But you can tell bundler that it shouldn’t be trying to except when developing.

    Then run bundle install and try to deploy on Heroku.

    Heroku does not support sqlite3 database, so you can NOT install sqlite3 gem on Heroku environment. as mentioned in this article, Heroku recommend to use Postgresql as production database.

    So, all you need to do is to follow the instruction in that article and replace your sqlite3 gem with pg gem, then do some db configuration.

    Git Baby is a git and github fan, let's start git clone.