Skip to content
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

[ci skip] Document how to rails new with a specific version #49338

Conversation

jean-francois-labbe
Copy link
Contributor

Motivation / Background

This Pull Request has been created because I never remember how to create a new rails application using a beta or rc release.
gem install rails --pre installs the latest prerelease version, currently this is 7.1.0.beta1.
Then which command should I type to generate a new project using 7.1.0.beta1, I never remember.
rails --help gives me no clue.

I'd like to avoid googling this next time.

Detail

This Pull Request adds few lines to the helper text displayed when running rails --help describing how to create a new rails application using a prerelease or specific version.

@rails-bot rails-bot bot added the railties label Sep 20, 2023
@@ -9,11 +9,18 @@ Description:
Note that the arguments specified in the .railsrc file don't affect the
default values shown above in this help message.

You can specify which version to use when creating a new rails application
using `rails _7.1.0.beta1_ new`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's a good addition, but preferably we wouldn't tie it to a specific version in the description. I could see other people submitting PRs just to update this in the future.

Maybe just a sample like this would be enough?

rails _<version>_ new

It may be fine to show a specific version in the "examples", not sure if a generic version example like this would work there too:

`rails _<version>_ new ~/Code/Ruby/weblog`

This generates a new Rails app with the provided version in ~/Code/Ruby/weblog.

Would that be enough indication to help next time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that would be great.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the documentation according to your review.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks. Do you mind squashing the commits?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commits squashed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jean-francois-labbe jean-francois-labbe force-pushed the document-rails-new-with-specific-version branch from be3ca5c to 90d5a5c Compare September 21, 2023 18:01
@carlosantoniodasilva carlosantoniodasilva merged commit c864a37 into rails:main Sep 21, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants