Issues with sqlite3 and heroku Issues with sqlite3 and heroku sqlite sqlite

Issues with sqlite3 and heroku


you are getting this error because heroku doesn't have Sqlite adapter it uses postgresql. So you will need to skip the use of Sqlite adapter on Heroku.

  1. if you are using DataMapper then use it like below-

DataMapper::setup(:default, ENV['DATABASE_URL'] || "sqlite3:your database file name")

  1. check if you are following below steps or not. May be you could have done few steps from below so ignore those and follow the rest.

1. Sign up at Heroku website:

https://id.heroku.com/login (Links to an external site.)

  1. Download toolbelt

  2. get bundler gem:

    gem install bundler

  3. create "Gemfile" in application directory:

  4. It will create "Gemfile.lock" file in your application directory.

bundle install --without production

  1. create "config.ru" file for rackup program with below contains

require './main'

run Sinatra::Application

  1. initialize git repository, in your application folder, run:

git init

  1. set git identity:

git config user.name "your-name"

git config user.email "yourname@email.com"

  1. add application to git repository and commit, in your application folder, run:

git add .

git commit -m "my first version"

  1. create application on Heroku

heroku create myapplication1

  1. push application from git repository to Heroku server

git push heroku master

12. create database on Heroku server

heroku run console

irb> require './main'

irb> DataMapper.auto_migrate!

connect to new web site

heroku open