performant-software / dm-2

Digital Mappa (DM for short) is a freely available online environment for creating projects out of digital images and texts.
https://www.digitalmappa.org
GNU General Public License v3.0
19 stars 18 forks source link

App won't compile in Heroku - Default #285

Open kcon6398 opened 3 years ago

kcon6398 commented 3 years ago

I get the following fatal compile error when attempting to deploy straight from Github to Heroku:

! The Ruby version you are trying to install does not exist on this stack. !
! You are trying to install ruby-2.5.7 on heroku-20.

Any idea how to get around Heroku's Rails dependancies without compiling everything locally?

hawkpf commented 3 years ago

I'm in the same boat. The problem you're referencing is heroku has moved past old versions of ruby. If you want to force heroku to use the stack 18 follow this link. https://devcenter.heroku.com/articles/heroku-18-stack. I however, want to move to heroku-20 by upgrading ruby to 2.7.3 or even 3.0.1. At this point I have 2.7.3 and all dependencies updated properly such that bundle install and bundle update fully builds.

I'm building this on Windows so I had to install ruby with devkit. https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.7.3-1/rubyinstaller-devkit-2.7.3-1-x64.exe

I then did a heroku git:remote -a "appname", did a git add . to capture my changes to Gemfile and Gemfile.lock. I then did a git push heroku master to push my new code to heroku and it built on ruby 2.7.3 and on heroku stack 20.

hawkpf commented 3 years ago

You can look at my Pull Request to resolve your issues: https://github.com/performant-software/dm-2/pull/287