[openstreetmap/openstreetmap-website] Add and unignore `.ruby-version` file to ensure consistent dev Ruby (PR #6333)

Nicholas La Roux notifications at github.com
Mon Aug 18 15:47:18 UTC 2025


larouxn left a comment (openstreetmap/openstreetmap-website#6333)

That's fair. If a contributor doesn't use `chruby`, `rbenv`, `rvm`, or `ruby-lsp` (may be others) this won't do anything for them. That said, `chruby` + `ruby-install`, `rbenv`, and `rvm` are most of the most popular Ruby development setups so I think a decent number of contributors may benefit from having a checked-in `.ruby-version`.

> After rbenv injects itself into your PATH at installation time, any invocation of `ruby`, `gem`, `bundler`, or other Ruby-related executable will first activate rbenv. Then, rbenv scans the current project directory for a file named `.ruby-version`. If found, that file determines the version of Ruby that should be used within that directory. Finally, rbenv looks up that Ruby version among those installed under `~/.rbenv/versions/`.

Source: [rbenv's README](https://github.com/rbenv/rbenv/blob/d1a19a398f78ec8e94a5ad251aaf8d241053fdbe/README.md)

> Additionally you might want to list your preferred ruby version in a `.ruby-version` file stored in your project folder. This would cause automatic switch to selected ruby whenever you enter the folder.

Source: [rvm's README](https://github.com/rvm/rvm/blob/551ef582307ae524ec9c2999fc0abf820c286dde/README.md)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6333#issuecomment-3197467987
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/6333/c3197467987 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250818/53eddb51/attachment.htm>


More information about the rails-dev mailing list