Katie H
Katie H

Reputation: 2293

Detected sqlite3 gem which is not supported on Heroku

I'm trying to push my rails app to Heroku, and I keep getting the following error:

       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 app

Here is what my gemfile looks like:

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

group :production do
  gem 'pg'
end

Any ideas on how to fix this? Any help is much appreciated!

Upvotes: 13

Views: 19835

Answers (5)

nourza
nourza

Reputation: 2321

For me I solve this issue by replacing gem 'sqlite3' with gem "pg" in the gemfile

and then ofcourse heroku restart and heroku rake db:migrate

Upvotes: -1

徐啟倫
徐啟倫

Reputation: 19

Try this

heroku rake db:reset
heroku rake db:migrate

Upvotes: -4

Vandre
Vandre

Reputation: 513

I have modified the gem file to use sqlite only on development, and test.

But, my mistake was: I have forgotten to commit the changes on git.

Upvotes: 34

S. A.
S. A.

Reputation: 3754

You have a typo:

group :development, :test do # <<<< :development, not devlopment
  gem 'sqlite3'
end

As heroku ignores development specific gems, when running the bundle it includes sqlite3 gem.

Upvotes: 28

sire
sire

Reputation: 43

Try using this for production

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor'
end

Additional information can be found here: https://devcenter.heroku.com/articles/sqlite3

Upvotes: -1

Related Questions