我应该使用 bin/rake db:migrate 还是 bin/rails db:migrate?
Should I use bin/rake db:migrate or bin/rails db:migrate?
Why are some commands living in bin/rails and some commands living in bin/rake?
TL;DR bin/rails db:migrate
从 Rails 5 开始应该可以正常工作。
根据Official Rails 5 Beta 1 story,这是一个非常普遍的问题,事情即将发生变化:
That’s a common question, especially for beginners, and we never had a good answer (just lots of technical excuses). So now we’ve committed to making bin/rails the one master command to rule them all. All your rake commands are available through here as a gateway, but we’ll eventually port many of them over. So your fingers will now have to get used to bin/rails db:migrate instead of bin/rake db:migrate. That should only take a few months!
Why are some commands living in bin/rails and some commands living in bin/rake?
TL;DR bin/rails db:migrate
从 Rails 5 开始应该可以正常工作。
根据Official Rails 5 Beta 1 story,这是一个非常普遍的问题,事情即将发生变化:
That’s a common question, especially for beginners, and we never had a good answer (just lots of technical excuses). So now we’ve committed to making bin/rails the one master command to rule them all. All your rake commands are available through here as a gateway, but we’ll eventually port many of them over. So your fingers will now have to get used to bin/rails db:migrate instead of bin/rake db:migrate. That should only take a few months!