Alex Rivera | Logout

Pushing Rails with SQLite3 to Heroku fails

Asked 2010-09-19T18:49:45.107
19

I experience the same scenario as described in Heroku deployment issue when I try to deploy my Rails 3 app to Heroku and sqlite3 is defined in the gems file.

/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require': no such file to load -- sqlite3 (LoadError)

Any clue why this is? The solution defined in the ruby-forum works, I just wondered why.

Edit
Report

2 Answers

4

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.

answered 2010-09-19T19:04:00.897
4

For more recent versions of Sqlite, you may use this instead:

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

This fixed it for me.

answered 2012-06-21T02:05:37.057

Your Answer