Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differnce between rails db:create and rake db:create [duplicate]

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?

like image 566
Ayub Ali Avatar asked Jun 11 '26 06:06

Ayub Ali


2 Answers

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

rake db:create

will become

rails db:create

like image 129
Pavan Avatar answered Jun 13 '26 18:06

Pavan


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

like image 37
Sheedo Avatar answered Jun 13 '26 18:06

Sheedo