2

I am currently learning rails. I was wondering what is the difference between rails db:create and rake db:create and vise versa for migrate? I know they both create databases but why are there two functions that do the same thing? Is one of them best suited for a particular situation?

mu is too short
  • 426,620
  • 70
  • 833
  • 800
Ayub Ali
  • 45
  • 9

2 Answers2

6

No difference! You can run all Rake tasks with the rails keyword in Rails 5. So

rake db:create

will become

rails db:create

Pavan
  • 33,316
  • 7
  • 50
  • 76
2

All rake commands have been replaced with rails in Ruby 5. They achieve the same task.

Sheedo
  • 524
  • 5
  • 13