

You can daemonize your application as you want. That’s it! Now you have your Server ready for your Ruby on Rails application. To finally create your application database and apply its migrations you can run the following commands from your app directory: RAILS_ENV=production rake db:create For example, if you are using MySQL your config/database.yml should look like this: # Mysql With your database service in place you need to make sure your app database configuration is also correct. If you need to compile your application assets run the following command in your application directory: RAILS_ENV=production rake assets:precompile Sudo chown -R www-data:www-data /path/to/rails/application/tmp To enable mod_rewrite module, please enter the following command in a terminal prompt: sudo a2enmod rewriteįinally you will need to change the ownership of the /path/to/rails/application/public and /path/to/rails/application/tmp directories to the user used to run the Apache process: sudo chown -R www-data:www-data /path/to/rails/application/public You should also enable the mod_rewrite module for Apache. Options Indexes FollowSymLinks MultiViews ExecCGI The first thing to change is the DocumentRoot directive: DocumentRoot /path/to/rails/application/public Modify the /etc/apache2/sites-available/nf configuration file to setup your domains. To install the Ruby base packages and Ruby on Rails, you can enter the following command in the terminal prompt: sudo apt install rails


MySQL) installed and configured, you are ready to install Ruby on Rails package. For instructions on installing and configuring a database service refer to MySQL documentation for example.

To install the Apache package, please refer to HTTPD - Apache2 Web Server. Installationīefore installing Rails you should install Apache (or a preferred web server) and a database service such as MySQL. It is optimized for sustainable productivity of the programmer since it lets the programmer to write code by favouring convention over configuration. Ruby on Rails is an open source web framework for developing database backed web applications. Multi-node configuration with Docker-Composeĭistributed Replicated Block Device (DRBD)
