Reputation: 45941
Added Mongoid but got:
LoadError:
Error loading the 'sqlite3' Active Record adapter.
Removed database.yml and got:
Could not load database configuration. No such file - ["config/database.yml"]
Saved empty database.yml and got:
ActiveRecord::AdapterNotSpecified:
'test' database is not configured. Available: []
Rails 5.2.2
Upvotes: 0
Views: 372
Reputation: 412
If it is fresh install use
rails new app --skip-active-record
if you already created an App with rails, which has active-record(mysql or sqlite3) use this link:
Also remove
active records
lines from
application.rb
Upvotes: 1
Reputation: 23347
ActiveRecord is a library that works only with relational databases. If you want to use MongoDB with mongoid, you don't need ActiveRecord. Remove any mention of AR and relational DBs from the application code, config and Gemfile. If you're stating from scratch, use rails new myapp --skip-active-record
See also: https://gorails.com/guides/setting-up-rails-4-with-mongodb-and-mongoid (related to Rails 4, but should help).
Upvotes: 0