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

The recommended script to create a new app runs into a file conflict when run with Rails v7.2.0 #1221

Closed
stevepolitodesign opened this issue Aug 15, 2024 · 2 comments · Fixed by #1223
Labels

Comments

@stevepolitodesign
Copy link
Contributor

Relates to #1214

Possibly relates to #1216 and #1215

Suspenders requires we run the following command to create a new application:

rails new app_name \
 --skip-test \
 -d=postgresql \
 -m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb

However, after the release of Rails v7.2.0, this command fails:

    conflict  .rubocop.yml
Overwrite /Users/polito/Sites/suspenders_qa_7_2/.rubocop.yml? (enter "h" for help) [Ynaqdhm]
@stevepolitodesign
Copy link
Contributor Author

stevepolitodesign commented Aug 15, 2024

One simple solution is to update the README by recommending we pass --skip_rubocop

@stevepolitodesign
Copy link
Contributor Author

stevepolitodesign commented Aug 15, 2024

Running the following worked. Note that we pass --skip_rubocop

rails new suspenders_qa_7_2 \
 --skip-test \
 --skip_rubocop \
 -d=postgresql \
 -m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb

stevepolitodesign added a commit that referenced this issue Aug 15, 2024
Closes #1221

The [release of Rails 7.2.0][rails_7_2] introduced its [own linting
mechanism][rails-lint].

Unfortunately, this creates a conflict with [our linting
mechanism][suspenders-lint].

This is only relevant when running `rails new` with our [application
template][].

In order to fix this, we simply require the caller pass
`--skip_rubocop`.

A future commit could explore re-introducing the system executable to
account for our required options, but for now, this fixes the issue.

[rails_7_2]: https://guides.rubyonrails.org/v7.2/7_2_release_notes.html
[rails-lint]: https://guides.rubyonrails.org/v7.2/7_2_release_notes.html#add-omakase-rubocop-rules-by-default
[suspenders-lint]: https://github.com/thoughtbot/suspenders/blob/main/FEATURES.md#linting
[application template]: https://github.com/thoughtbot/suspenders/blob/main/lib/install/web.rb
stevepolitodesign added a commit that referenced this issue Aug 16, 2024
Closes #1221

The [release of Rails 7.2.0][rails_7_2] introduced its [own linting
mechanism][rails-lint].

Unfortunately, this creates a conflict with [our linting
mechanism][suspenders-lint].

This is only relevant when running `rails new` with our [application
template][].

In order to fix this, we simply require the caller pass
`--skip_rubocop`.

A future commit could explore re-introducing the system executable to
account for our required options, but for now, this fixes the issue.

[rails_7_2]: https://guides.rubyonrails.org/v7.2/7_2_release_notes.html
[rails-lint]: https://guides.rubyonrails.org/v7.2/7_2_release_notes.html#add-omakase-rubocop-rules-by-default
[suspenders-lint]: https://github.com/thoughtbot/suspenders/blob/main/FEATURES.md#linting
[application template]: https://github.com/thoughtbot/suspenders/blob/main/lib/install/web.rb
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 a pull request may close this issue.

1 participant