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
- Fix a scenario where the database couldn't load Fixes #36 Fixes #37 — committed to sinatra-activerecord/sinatra-activerecord by janko 10 years ago
- Add a useless file (?) activerecord/rake wants a database.yml to tell it how to define the connection, but apparently is entirely incapable of reading it no matter what we do with it: https://github.... — committed to Cyclid/Cyclid by Vanders 8 years ago
Rakefile: require ‘sinatra/activerecord’ require ‘sinatra/activerecord/rake’
In your
database.yml
you need to useadapter
instead ofadaptor
.