search
LoginSignup
4

More than 3 years have passed since last update.

posted at

updated at

Rails:[Don't know how to build task 'db:']の対処方法

はじめに

初歩的なエラーかと思いますが、私が初心者のため備忘録を含め記録として残したいと思います。

結論:rails db: migrateではなく、rails db:migrateを実行する。

ターミナルで$ rails db: migrateと入力した際に以下のエラーが返ってきました。

ターミナル
rails aborted!
Don't know how to build task 'db:' (see --tasks)
/usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.0.7/lib/rails/commands/rake_proxy.rb:14:in `block in run_rake_task'
/usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.0.7/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.0.7/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/usr/local/rvm/gems/ruby-2.4.1/gems/railties-5.0.7/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)

rails db: migrateではなく、rails db:migrateを実行することで解決。

solved
rails db:migrate

ご参考になれば幸いです。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
4