I was looking into what it would take to support .ruby-version
on heroku. I was looking for a spec but couldn't find one. I saw the gisted doc but I couldn't see the format being described. But it looks like it's just:
<engine>-<engine_version>
The problem is that I want to specify the ruby version for something like JRuby. The differences of 1.8 or 1.9 mode in JRuby are significant. The way I store the files on Heroku is something like this:
ruby-<ruby_version>-<engine>-<engine_version>
The versions for each would include major, minor, and patch where appropriate. This is something we strived to achieve in Bundler. A path I also see forward with Bundler is that bundle install will "lock" the version to a .ruby-version
file that's generated and people can check this in. Heroku can then read this file to determine the ruby version. The other benefit is Bundler can also still perform runtime checks to make sure you're running the right ruby version.
I assume this is the gist you are referring to?
If you want to change the format, it needs to be backward compatible with the existing format. Something that allows for greater precision sounds good to me but
rbenv
,chruby
, andrvm
will need to be patched to parse the new format, so it’s probably best to involve the maintainers of those projects early.Would this replace Bundler’s
ruby
method?