sinatra-activerecord: AdapterNotSpecified - Rake tasks not working

Hello, just recently I installed this gem and wanted to put it to good use, followed the instructions, Sinatra app ran. But when I wanted to mess with the actual database via rake tasks I always get an error of “ActiveRecord::AdapterNotSpecified ‘development’ database is not configured”.

I am using a config/database.yml file which has the following contents:

development:
  adapter: sqlite3
  database: db/development.sqlite3

test:
  adapter: sqlite3
  database: db/test.sqlite3

I don’t know whether the error is on my side, or if there is just something incompatible.

Thanks in advance!

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 33 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Rakefile: require ‘sinatra/activerecord’ require ‘sinatra/activerecord/rake’

In your database.yml you need to use adapter instead of adaptor.