Given all the changes in the Ruby on Rails ecosystem that have happened, and at a quite rapid pace, over the years, I can’t really recommend the Install Script for Ruby on Rails at the moment (even if it were in GPL).
Jamie’s refactoring the proxying and port protection features a bit to make it more obvious how to run any web app server (whether that’s Rails with Puma or Unicorn or something Node or Python or Perl) under Virtualmin without needing root access to set it up. I think that’s in the next version coming really soon…but it might be the next version after that. I haven’t followed his checkins lately to know what he’s been working on. But I know this is on his todo list.
Right now, the way I’m running our Ruby on Rails apps is to set them up in the way recommended by the application in question (our Discourse runs in a docker container with puma, the new ecommerce thing I’m working on is currently Solidus also running under puma but not in a docker container). Both have ProxyPass/ProxyPassReverse rules setup to handle getting from port 80/443 to port 3000 (or whatever) on localhost. This is how you should run any app with its own web server under Virtualmin, it is very generic and applies to everything modern. (PHP-FPM is roughly the same model, we just happen to have a lot more specialized support for it because of the much higher popularity of PHP in shared hosting environments.)