Answer the question
In order to leave comments, you need to log in
What is a good guide for setting up a server for a rails application?
Gentlemen, I need help with a choice.
In general, the situation is as follows: you need to install a server on a local machine in the office and prepare it for using the rails application. A good manual is required for setting everything up, since I still have no experience in setting up all these things.
The application uses:
Rails 4
Postgresql
What rake stones to face when setting up a server?
You need to do everything yourself, since the initiative is mine and all the bumps too :)
Answer the question
In order to leave comments, you need to log in
I set up the server like this:
First of all, I create a non-root, sudoer user from which I install and deploy everything (through capistrano, for example).
# non-root user
# password for deployer
# deployer a sudoer
Log in as deployer
Install RVM.
# RVM
# RVM requirements
I install Ruby through RVM.
# Ruby
Rails without docks(--no-document)
# Rails
NodeJS for js runtime
# ExecJS NodeJS Javascript runtime
MySQL/PostgreSQL
Apache
# Install Apache packs
Passenger
# Passenger
# Apache module
Configure Apache
# etc/apache2/mods-available/passenger.load
#etc/apache2/mods-available/passenger.conf
<IfModule mod_passenger.c>
PassengerRoot /home/deployer/.rvm/gems/ruby-2.1.2/gems/passenger-4.0.37
PassengerDefaultRuby /home/deployer/.rvm/gems/ruby-2.1.2/wrappers/ruby
</IfModule>
<VirtualHost *:80>
ServerName sitename.com
DocumentRoot /home/deployer/ror_apps/sitename/current/public # путь для capistrano. либо свой
<Directory /home/deployer/ror_apps/sitename/current/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
Yes, hundreds of them. https://gorails.com/setup/ubuntu/14.04 choose an axis.
For me the sequence is:
RVM
Ruby
Git
PostgreSQL
...
PROFIT
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question