I use Ruby 1.9.x syntax in my Rails 3 app, but after pushing it to Heroku it crashes due to older Ruby version (1.8). How can I control it?
I wanted to use the version I already had defined in the .ruby-version
file so I ended up creating a buildpack that can be used before heroku-buildpack-ruby that injects the version from the .ruby-version into the Gemfile
. It also support versions without patch or aliases.
https://github.com/platanus/heroku-buildpack-ruby-version
This way you can have your version defined only in one place.