zjmiller
zjmiller

Reputation: 2787

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

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 whether a certain command is associated with rails or rake, is there a simple conceptual principle that would allow me to figure it out?

Upvotes: 2

Views: 75

Answers (1)

Justin Niessner
Justin Niessner

Reputation: 245429

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.

Upvotes: 2

Related Questions