views:

117

answers:

3
+1  A: 

I thing sqlite3 is intentionally not provided at Heroku because this database system is embedded database which runs in same process as application. Heroku is distributed environment which means same application may run on many machines within many processes. That would give multiple separated sqlite3 instances - totally unrelated (imagine two isolated separate mysqls on two machines).

In distributed environment at least the 'client-server' centralized type database must be used, e.g: MySQL, PostgreSQL, Oracle.

gertas
However, in my case, heroku was smart enough to ignore the sqlite gem reference in my Gemfile for local devlopment, and automatically switched to PostgreSQL on production without me explicitly specifying it anywhere. It even generates its own database.yml production settings. I wonder why John is getting the above error then?
Joost Schuur
+1  A: 

Because of theirs arhitecture, Heroku allows only postgres, so sqlite gem not installed.

valodzka
+2  A: 

Make sure you don't include sqlite in your Gemfile in production environments:

This is right:

source :gemcutter
gem 'rails'

group :development do
  gem 'sqlite3-ruby', :require => 'sqlite3'
end

This is wrong:

source :gemcutter
gem 'rails'        
gem 'sqlite3-ruby', :require => 'sqlite3'
Johannes Brodwall