Ruby on Rails (abbreviated as Rails) is an open-source Web application framework that is developed in Ruby. This topic describes how to deploy a simple Rails project in Web+.

Step 1: Install Rails

Use the following command to install Rails.
gem install rails

Step 2: Create a Rails application

  1. Use the following rails command to create a new application.
    rails new webplusdemo
    A project directory named webplusdemo is created after you run the preceding command.
  2. Go to the webplusdemo project directory and use the following command to start the service.
    rails server
  3. Open a browser and enter http://localhost:8080 in the address bar to visit the homepage of the application.

Step 3: Package the application

Go to the project directory and use the following command to archive the application.

zip -r webplusdemo.zip . /

Step 4: Deploy the application in Web+

  1. In the Basic Information step, select Ruby in the Tech Stack Type field and enter an application name and description. Click Next after the configuration is complete.
  2. In the Creation Complete step, click View Application or Creation Complete to go to the Overview tab of the Application Details page. Click the name of an environment to go to the Overview tab of the Environment Details page. Then, click the link next to the Public IP Address label to visit the homepage of the application.

References