Reputation: 203
I have some trouble to push my rails app to heroku.
I have the error
Failed to install gems via Bundler. remote: ! Detected sqlite3 gem which is not supported on Heroku: remote: ! https://devcenter.heroku.com/articles/sqlite3
So i did follow the instructions on the link, however, I still have the same error. I've tried to have a look on others similar subjects, but still not working ..
Any idea?
UPDATE Here's what my gemfile looks like :
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '~> 2.13'
gem 'selenium-webdriver'
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'sqlite3'
end
group :production do
gem 'pg'
end
Upvotes: 0
Views: 106
Reputation: 26
Using sqlite3 for your unit tests and development environment is fine but on production you would want to use something like PostgreSQL.
Here is what your Gemfile could look like:
group :test, :development do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
Also if you are writing unit tests you should set your sqlite3 database URL to sqlite::memory:
for your unit tests and not your actual database.
Upvotes: 0
Reputation: 23327
While easy to use, SQLite is not intended as a production grade database. Instead Heroku provides production grade PostgreSQL databases as a service.
Don't use sqlite on heroku - assure that you don't have sqlite3
gem in the global scope or :production
group of your Gemfile
.
Upvotes: 3