I’ll describe the process how to install Ruby on Rails application on Ubuntu from scratch.
But firstly we have to prepare our server for application.
We will use DigitalOcean.
There’s a lot of kinds of droplets, Ruby on Rails included, and clean images based on Ubuntu and etc.
I prefer image with Ruby on Rails.
For the first, add your public SSH key for DigitalOcean, just copy it locally like:
Then put it to your DO profile.
First ssh connection will ask you for change password:
Then we have to add user, which will be responsile for deploying our application:
And we’ll add him all privileges:
This is it for now, le’ts move to another part - software!
Let’s start from RVM, ad install it:
Last postgresql version:
Let’s to allow any connections to our postgresql from localhost:
And replace some configs inside:
Then, restart our postgres server:
Settings password for root user for our DB, and create database for blog:
Other sofr - Git, Node.js:
In case of our image that included Ruby on Rails, we already have some nginx configs for Rails:
And nginx config will look like:
We’ll just create symlink and make this site config enabled:
If you have any questions - just ping us for help.