Search code examples
ruby-on-railsherokunext-rails

How to use the next_rails gem for dual booting on heroku


I am using the next_rails gem for dual booting and am ready to test on heroku, which I normally do by git push staging master. How do I test the next rails version on heroku?


Solution

  • Dual-Boot

    I'm assuming you already dual-booted the Rails application, so you just need to deploy your main branch, and changing the BUNDLE_GEMFILE value will change between the current and next Rails version.

    if you haven't dual-booted your app follow this article https://www.fastruby.io/blog/upgrade-rails/dual-boot/dual-boot-with-rails-6-0-beta.html

    Compatible Buildpack

    Now as for being able to run the next rails version on Heroku, you should use this forked buildpack https://github.com/fastruby/heroku-buildpack-multiple-gemfiles, the official Heroku build seems unprepared to do that.

    Here is this article for more info https://www.fastruby.io/blog/how-to-run-multiple-versions-of-rails-on-heroku.html