Deploying RoR app to Heroku with SQLite 3 fails

Viewed 19793

I'm trying to deploy my first app to Heroku. I'm using SQLite as the database. As far as I know Heroku doesn't use SQLite - it switches to Postgres in the backend.

When I'm deploying I get the following error:

/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)

My Gemfile (which is what I assume is causing this problem) looks as follows:

source 'http://rubygems.org'

gem 'rails', '3.0.0'        
gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'

What am I doing wrong?

7 Answers

i was facing similar issue, but I realized that I was on a different branch - new_layout and was pushing master. So I pushed my desired branch to heroku using following command and everything worked fine.

git push heroku new_layout:master 
Related