-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mention "rake" less in guides #47610
Conversation
Agree the mentions of builtins should all use For custom tasks, though, IMO I don't think we have a discussed-and-established endgame policy, but at least in my head, the long-term goal would be to separate the two commands again. I see the "try for a rake task" fallback behaviour of |
[This blog post](https://dev.to/youngbloodcyb/rake-junior-rails-review-13cc) is about the confusion between `bin/rake` and `bin/rails` commands. The two have mostly [been aliases since Rails 5](rails@3d252a0#diff-f5ff9aa07f44111a79d56c09ec37d774b462d97aff68f32490c2e56e74c95783R162), but this means there's all sorts of advice floating around the internet about which command to use. Is `rake db:migrate` the same as `bin/rails db:migrate`? I know that it is, but I can see why it's confusing for a first timer. The blog post's suggestion was to have a section in the guides that introduces rake and talks about this distinction. I'm not sure about this. I think if we take up too much space too early in the guide discussing this, it risks confusing people even earlier. But if the advice is hidden away too much, nobody will find it. Something I think we should do, though, is mention `rake` as little as possible in the guides. Mentions in upgrade guides and release notes are fine, but elsewhere we should avoid using it in places where `bin/rails` does an equivalent job. This PR removes a few `rake` mentions from the guides. Before doing this, I was expecting there to be a lot more, so this PR turned out to be a bit smaller than expected. Still, every little bit helps I think.
@matthewd roger that. I undid the changes to the "custom rake tasks" section. How does the rest look? |
@matthewd I've always wondered if the plan was to migrate all build-ins to Thor. And I gather I can close: #47589 ? |
I like this PR too. |
But if we want to have a clear seperation between Rails commands and Rake tasks, is it still beneficial? |
Oh, right. Maybe that should be reworded, I'll make a suggestion. |
@matthewd is this fine to get merged? |
I saw @p8 is moving some task to use Thor here rails#47610 thought I probably may help with it. This migrates the `tmp:cache:clear` task to Thor
This blog post is about the confusion between
bin/rake
andbin/rails
commands. The two have mostly been aliases since Rails 5, but this means there's all sorts of advice floating around the internet about which command to use. Israke db:migrate
the same asbin/rails db:migrate
? I know that it is, but I can see why it's confusing for a first timer.The blog post's suggestion was to have a section in the guides that introduces rake and talks about this distinction. I'm not sure about this. I think if we take up too much space too early in the guide discussing this, it risks confusing people even earlier. But if the advice is hidden away too much, nobody will find it.
Something I think we should do, though, is mention
rake
as little as possible in the guides. Mentions in upgrade guides and release notes are fine, but elsewhere we should avoid using it in places wherebin/rails
does an equivalent job. This PR removes a fewrake
mentions from the guides. Before doing this, I was expecting there to be a lot more, so this PR turned out to be a bit smaller than expected. Still, every little bit helps I think.cc @youngbloodcyb