I have recently reinstalled Ruby on Rails 3.0.0 and created a new Rails project in NetBeans 9.6.1
I could not migrate my database, or any other rake tasks for that matter. I kept getting the error: "db:migrate" task does not exist
The solution is to right click your project select "Run/Debug Rake Task" and then click the button titled "Refresh Tasks".
Once this is done you should see a list of all your rake tasks. After this you can simply re-run the db:migrate task and it will work.