Ubuntu Run Script on Start up
In order to run a custom script on startup on Linux/Ubuntu system, you can follow these steps:
Create custom file e.g. startup_script in your home folder:
Then edit script and enter following:
cd /home/SOME_USER/projects/YOUR_AWESOME_FOLDER/; bundle exec rails s
Now, make that script executable:
chmod +x startup_script
Now, open cron tab:
And add a line at the end of that file that calls your custom created script that should run on startup.
Now, each time your server is restarted it will start your applications immediately.