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

Warn users when .ruby-version file is Ignored #305

Closed
lilacstella opened this issue Jul 17, 2024 · 1 comment
Closed

Warn users when .ruby-version file is Ignored #305

lilacstella opened this issue Jul 17, 2024 · 1 comment

Comments

@lilacstella
Copy link
Contributor

The current buildpack does not provide any warning or acknowledgement when there is a .ruby-version file in the root directory. Instead, it solely relies on the Ruby version specified in the Gemfile.lock. This behavior is intended but can lead to confusion and unexpected results, as users may assume the buildpack will use the Ruby version from the .ruby-version file.

To enhance the user experience and avoid potential issues, the buildpack should issue a warning when a .ruby-version file is detected but ignored. This warning should inform users that the buildpack will use the Ruby version specified in the Gemfile.lock and recommend updating the Gemfile.lock to match the desired Ruby version.

This warning should go well if coupled with #304 where the lack of a specified version is also added to a warning.

Actual behavior

Currently, the .ruby-version file is ignored and only the version specified in Gemfile.lock or a default will be chosen.

Expected outcome

When the buildpack detects a .ruby-version file in the root directory but ignores it in favor of the Ruby version specified in the Gemfile.lock, it should:

  • Detect the presence of the .ruby-version file.
  • Output a warning message informing the user that the .ruby-version file will be ignored.
  • Inform the user that the Ruby version specified in the Gemfile.lock will be used instead.
  • Recommend updating the Gemfile.lock to reflect the desired Ruby version to avoid any confusion or unexpected behavior.
  • (Optional) Not issue this warning if the current Ruby version being installed is already consistent with this file.

The warning message could go like this:

`.ruby-version` file detected but will be ignored. To avoid confusion or unexpected results, please specify the desired Ruby version in your `Gemfile.lock`.
@schneems
Copy link
Contributor

schneems commented Nov 6, 2024

Closing in favor of #346

@schneems schneems closed this as completed Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants