I have the same problem running on ubuntu 18.04 with rails 5.0.1 and ruby 2.3.3: starting my server from the command line or via systemd leads to the same output:
$ /usr/local/bin/ruby bin/rails server -b0.0.0.0 -p 3000 -e production
=> Booting Thin
=> Rails 5.0.1 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
[2022-06-21 12:55:32] INFO -- Thin web server (v1.8.1 codename Infinite Smoothie)
[2022-06-21 12:55:32] INFO -- Maximum connections set to 1024
[2022-06-21 12:55:32] INFO -- Listening on 0.0.0.0:3000, CTRL+C to stop
Exiting
I see this output in the console if I start the server from the console or in journalctl if I start it via systemd, while systemctl status reports Main PID: 19315 (code=killed, signal=TERM)
as the OP notes.
Another odd observation is if I start the server from the command line with the -d (run as daemon) then it works as it should:
/usr/local/bin/rails server -b0.0.0.0 -p 3000 -e production -d
Works properly!
Nothing has changed in the systemd service file and there have been few significant changes in the server code itself. This could be an environment problem as I went through gem hell trying to provision the server. However, that doesn't really explain the -d thing.