Open
Conversation
This is pretty much the community standard now, and is supported by all the major version managers (rbenv, rvm, chruby, etc.) and tooling (Rubocop, the `ruby/setup-ruby@v1` GitHub action, etc.)
tjschuck
commented
Jan 28, 2025
|
|
||
| set :rvm_type, :user | ||
| set :rvm_ruby_version, '3.2.6' | ||
| set :rvm_ruby_version, File.read("#{File.dirname(__FILE__)}/../.ruby-version").strip |
Author
There was a problem hiding this comment.
This style recommended/documented here: https://github.com/capistrano/rbenv?tab=readme-ov-file#usage
tjschuck
commented
Jan 28, 2025
| - rubocop-rspec | ||
|
|
||
| AllCops: | ||
| TargetRubyVersion: 3.2 |
Author
There was a problem hiding this comment.
https://docs.rubocop.org/rubocop/configuration.html#setting-the-target-ruby-version
If a
TargetRubyVersionis not specified in your config, then RuboCop will check your project for a series of other files where the Ruby version may be specified already. The files that will be checked are (in this order):*.gemspec,.ruby-version,.tool-versions, andGemfile.lock.
tjschuck
commented
Jan 28, 2025
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: ${{ matrix.ruby-version }} |
Author
There was a problem hiding this comment.
https://github.com/ruby/setup-ruby?tab=readme-ov-file#single-job
Not needed with a
.ruby-version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is pretty much the community standard now, and is supported by all the major version managers (rbenv, rvm, chruby, etc.) and tooling (Rubocop, the
ruby/setup-ruby@v1GitHub action, etc.)Makes it a little more seamless to get up and running to make contributions.