Help needed to deploy a somewhat old rails project on an AWS EC2 instance

Hi everyone. I’m quite stuck and I kind of have 2 options and need some insight please.

I have a somewhat old Rails project that was recently revived. The project was started about 4 years ago on Rails 6.1 with webpacker and Ruby 2.6.4

The project was idle for many years but we picked it back up and finished it (as is). We’re now trying to deploy it to a fresh new AWS instance (Running Ubuntu 24)

We’re trying to follow tutorials (many of them) to “Deploy a rails project to Ubuntu” but most of them use a lot more recent ruby versions and things such as Docker containers. We were able to find a few that were written a few years ago (and unchanged since then)

We first tried to use the same ruby version but we ran into issues when trying to install bundler because of a bunch of incompatibility. We then proceeded to upgrade Ruby to a version 3.X

We can get further but when we try to install nginx we run into some missing libraries

The following packages have unmet dependencies: nginx-extras : Depends: perlapi-5.22.1 but it is not installable Depends: libperl5.22 (>= 5.22.1) but it is not installable Depends: libssl1.0.0 (>= 1.0.2~beta3) but it is not installable Recommends: passenger (>= 6.0.15) but it is not going to be installed Recommends: passenger (< 6.0.16) but it is not going to be installed

I have a hard time understanding how Ubuntu 24 can have missing dependencies. When I try to install them it still tells me they are not installable.

Not sure what to do next. I’m entertaining the idea of upgrading the app to 7 or maybe 8 with importmap and then try to deploy using a more recent tutorial. But I feel like this would be an even bigger endeavor than trying to get the server prepared for the current app deployment.

Note: This app had been deployed before (we’re using capistrano) to a staging environment running on an EC2 instance. But that instance has since been decommissioned, otherwise I would have used that server as an AMI and used it)

Any tips, advice or links to articles or tutorials is appreciated!