Don't run Bundler as root. Installing your bundle as root will break this application for all non-root users on this machine.
Your Ruby version is 2.7.4, but your Gemfile specified 3.2.1
Error Failed to install dockerfile-rails gem, exiting: exit status 18
Downgraded ruby (feelsbad). Had to manually install libpq-dev, had to change some yarn stuff, had to manually add the deploy files later on the git repo. But in the end I managed to deploy it.
Problem now is that every time I need to deploy, I have to do it via /terminal because for me locally it timeout.
I’m not an expert on networking, perhaps others can help; but I can provide some context.
At this point we are dealing with three virtual machines: your app, your builder, and your terminal. You can control where your app is ultimately deployed but that’s not the problem here. The problem is that you can’t get to your builder. Both your builder and terminal are created close to you. It seems odd that you can get to your terminal, and it can get to your builder, but you can’t get to your builder.
Should your code be on GitHub, another alternative would be to create a GitHub action which will automatically deploy when you merge code into the main branch:
FYI: you can use rvm or rbenv to install newer versions of Ruby on the terminal, but clearly the goal is to get you able to develop on your machine.