开发者

What do we need both the rails and the rake commands?

开发者 https://www.devze.com 2023-03-16 08:25 出处:网络
Why are some commands (e.g., generating a new controller or model) executed with the rails command? While others (e.g., migrating databases and running specs) executed with the rake command? Is there

Why are some commands (e.g., generating a new controller or model) executed with the rails command? While others (e.g., migrating databases and running specs) executed with the rake command? Is there a reason these weren't just all included under rails? Also, if I can't remember w开发者_如何学运维hether a certain command is associated with rails or rake, is there a simple conceptual principle that would allow me to figure it out?


There's a conceptual difference between rails commands and rake commands.

rails commands add something to your application.

rake commands are for building/testing/deploying your application.

Those differences should explain both why there are two different commands as well as help you figure out which one to use for which tasks.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号