Don't know how to build task 'db:create'
Just figured it out. Someone had commented out the following in application.rb:
require 'rails/all'
Once put back rake -T returns the db tasks.
For people landing here in 2019:
If you ran rails new
with -O
(Capital 'O') or --skip-activerecord
and want to add a database later, you need to uncomment this in application.rb
to enable the Active Record framework:
require "active_record/railtie"
Edit:
You will also need to create the following structure in your application's root dir:
your_app
|_config
|_ database.yml
|_db
|_ migrate
|_ schema.rb
then run:
rake db:schema:dump