Grid Guides

Explore How System On Grid Can Work For You

Grid GuideGrid Guide Topics


Ruby on Rails One-Click App Setup


Introduction

One of the many available One-Click Apps that we have is Ruby on Rails. Ruby on Rails, or simply Rails, is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller framework, providing default structures for a database, a web service, and web pages.

Prerequisites

  • Orbit created with Ruby on Rails image

  • Running Orbit

Creating Your Orbit

  1. To create your application, you must create a Photon. You can do so by selecting the Photon tab after selecting 'Create Orbit'

    Photons
  2. Once there, you will see a list of available photons that you can create. Select one and it will bring you to a detailed page

    Photon List Photon Description
  3. Scroll down to the details and you can start selecting options for your photon as well as setting up credentials.

    Photon Details
  4. Once everything is filled in, just press Create and you can move on to the next step

SSH into Orbit

  1. First we need to check some details on our orbit by first navigating to the “My Orbits” tab.

    My Orbits
  2. Once there, click on the Orbit you want to connect to and check for three things:

    • IP Address

    • Running Status

    • Source Image(Ubuntu, Debian, Centos, Fedora)

    Orbit Details
  3. Once you have confirmed that your Orbit is running and you have the other information. Open up your console.

  4. Now you can SSH into your Orbit by running.

    ssh [email protected]
    • IP Address: We got this from the detail page, in this case it is “216.200.116.60”

    • Image: We got this from the source image in the details page. It should be one of the following: ubuntu, debian, fedora, centos

    • Note: A full command for this example would be: “ssh [email protected]

Starting Ruby on Rails

  1. Once you are SSH'd into the server you will see the following.

    Ruby on Rails CMD
  2. If you wish to create your own database, you run the following.

     cd myapp/
    vim config/database.yml

    Now you can edit the settings to create your own database like the image below and then run the following command.

    rake db:create
    Ruby on Rails DB
  3. Now that everything is set, we can start our server by running the following.

    rails server
    Ruby on Rails Server
  4. Now we can navigate to our orbit's page with port 3000 and you will see your homepage.

    Ruby on Rails Home