Ruby on Rails on ValueHost Servers

    Hello. ValueHost

    Company continues to upgrade the new line of VH3 servers and now our users have the opportunity to install Ruby on Rails applications on their virtual servers. Today we will tell you how to install a RoR application using the example of Radiant CMS . The first thing we need to do is get access to SSH: Control Panel -> SSH -> Set the password and the On flag. (Or we restrict by IP) Next, we create a database for our application: Control Panel -> Databases -> MySQL or PgSQL to choose. We remember the database name, password, type, and address of the database server. Create a virtual server:



    image





        



        




        Control Panel -> Web Servers -> Create New:

          Applications on the Server -> Ruby On Rails
          Root Folder -> cms
          Server Name -> mydomain.ru
          Turn on Accelerator for Static Content Delivery -> On

        Save

    While the settings for the new server are applied (it takes no more than half an hour, the status can be viewed Control Panel -> Home ), create an application on the server.

    Using any SSH client, we go to the server:

        ssh my_admin_login@mydomain.ru

    Where,

        my_admin_login - your administrator login
        mydomain.ru - your domain, or the server’s technical address

    After entering the password (we set it at the very beginning), we execute the following command:

    For MySQL: radiant -d mysql cms For PostgreSQL: radiant -d postgresql cms Where, mysql / postgresql is the type of cms database - the root folder specified in the settings server Set up database configuration by editing cms / config / database.yml: After the line «production» complete me: database: database name username: name database password: The password you specified when creating a database host: database server address data editing another file

        



        



        
        





        
        
        
        

    cms / config / environment.rb , add the line to it:

        ENV ['RAILS_ENV'] = 'production'

    And last, at the command prompt, run the command:

        rake production db: bootstrap

    We answer simple questions:

        Name (Administrator) : Administrator name
        Username (admin) : Administrator login
        Password (radiant) : Administrator password
        Select a database template : This is the demo content for your site

    . That's all, open the mydomain.ru site and edit the contents in the admin mydomain.ru/admin

    to install a “clean” Ruby on Rails, just replace the radiant command with the rails command .

    If you need to install additional gems, contact Online Support from your Control Panel, and we will be happy to do so.

    That's all. Next time we will tell you how to run Python scripts using Django as an example.

    Always with you, ValueHost Team.

    Also popular now: