First of all, we assume you already have Ruby installed on your system. If you do not have Ruby installed on your system, Use one of below URL to install it as per your application requirements.
How to Install Latest Ruby on Debian, Ubuntu, Linuxmint
Step 1 – Prerequisites
First of all, enable the HTTPS support for Apt repositories and install the PGP keys for passenger packages on your system.
Then, add the passenger repository reference to below file. The lsb_release -cs
will set the codename of your operating system. You can also change this and set the codename manually.
Step 2 – Install Passenger Apache module
Now install the Apache passenger module on your system. You can also specify to install or upgrade Apache2 to the latest version. Now enable the passenger module (if not enabled already) using the following command. After that restart Apache service to reload the new settings.
Step 3 – Create Apache VirtualHost
Now, you can deploy your Ruby/Rails application on this server. Create a Apache configuration file and configure the virtual host like blow. Change the document root as per your application location on disk. Now, enable the newly created Apache site configuration file.
Step 4 – Verify Setting and Restart Apache
Execute the below command to validate the passenger installation on your system. All checks should be passed properly. If any of check failed, it will help you to fix.