Saturday, December 8, 2018

Installing ruby on rails with Apache on Ubuntu 16.04 LTS for production

Recently I decided to start with ROR and move away from PHP.
So I decided to first setup production like environment for rails.
And to my surprise it wasnt the easy task to do, at least for me.
hence decided to blog about same and share.

Have taken heavy reference from two sites, and those are as given below.
  1. https://gorails.com/setup/ubuntu/16.04
  2. https://stackoverflow.com/questions/33573972/run-rails-application-with-apache-and-passenger-on-ubuntu/44920822#44920822
Was planning to go with latest rails but after lots and lots of try, was not able to resolve few of the permission issues. That is when one of my colleague suggested me to start with some old version.

Below are the version details:
Operating system: Ubuntu 16.04.5 LTS
Ruby: ruby 2.5.3
Rails: Rails 5.0.7.1
Passenger: Phusion Passenger 5.3.7

Note: first try below procedure on your dev, UAT or day-1 environment, do not follow it directly on production.

Let's start with installation process.

Installing ruby on rails with Apache on Ubuntu 16.04 LTS for production

Recently I decided to start with ROR and move away from PHP. So I decided to first setup production like environment for rails. And to my...