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.
Disk backed storage If you were to use SQLite on Heroku, you would lose your entire database at least once every 24 hours. Even if Heroku's disks were persistent running SQLite would still not be a good fit. Since SQLite does not run as a service, each dyno would run a separate running copy.
Make sure you don't include sqlite in your Gemfile in production environments:
This is right:
source :gemcutter
gem 'rails'
group :development, :test do
gem 'sqlite3-ruby', :require => 'sqlite3'
end
This is wrong:
source :gemcutter
gem 'rails'
gem 'sqlite3-ruby', :require => 'sqlite3'
SQLite requires a permanent writable file system. (i.e. Your program ultimately needs access to the POSIX fopen() and fwrite() API calls to a particular file). Heroku does not provide a permanent writable file system. Therefore, SQLite 3 won't work.
Because of theirs arhitecture, Heroku allows only postgres, so sqlite gem not installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With