How to Deploy Ruby on Rails with Marketplace Apps
Updated , by Linode
Traducciones al EspañolEstamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
Ruby on Rails Marketplace App
Ruby on Rails is a server-side web application framework that allows web designers and developers to implement dynamic, fully featured web applications.
Deploy a Ruby on Rails Marketplace App
Linode’s App Marketplace allows you to easily deploy software on a Linode using the Linode Cloud Manager. To access Linode’s App Marketplace:
Log in to your Linode Cloud Manager account.
From the Linode dashboard, click on the Marketplace button in the left-hand navigation menu.
The Linode creation page appears, with the Marketplace tab pre-selected.
Under the Select App section, select the app you would like to deploy:
Once you have selected the app, proceed to the app’s Options section and provide values for the required fields.
The Ruby on Rails Options section of this guide provides details on all available configuration options for this app.
Ruby on Rails Options
You can configure your Ruby on Rails App by providing values for the following fields:
|Rails Application name||The name for your rails application. Required.|
After providing the app specific options, provide configurations for your Linode server:
|Select an Image||Debian 9 is currently the only image supported by Ruby on Rails Marketplace Apps, and it is pre-selected on the Linode creation page. Required.|
|Region||The region where you would like your Linode to reside. In general, it’s best to choose a location that’s closest to you. For more information on choosing a DC, review the How to Choose a Data Center guide. You can also generate MTR reports for a deeper look at the network routes between you and each of our data centers. Required.|
|Linode Plan||Your Linode’s hardware resources. Required.|
|Linode Label||The name for your Linode, which must be unique between all of the Linodes on your account. This name will be how you identify your server in the Cloud Manager’s Dashboard. Required.|
|Root Password||The primary administrative password for your Linode instance. This password must be provided when you log in to your Linode via SSH. The password must meet the complexity strength validation requirements for a strong password. Your root password can be used to perform any action on your server, so make it long, complex, and unique. Required.|
When you’ve provided all required Linode Options, click on the Create button. Your Ruby on Rails app will complete installation anywhere between 2-5 minutes after your Linode has finished provisioning.
Getting Started after Deployment
Access Ruby on Rails
After Ruby on Rails has finished installing, you will be able to access Ruby on Rails from the console via ssh with your Linode’s IPv4 address:
Log out and log back in as your limited user account.
Update your server:
sudo apt-get update && apt-get upgrade
Ruby comes with some pre-made scripts to get you started. One of these is a blog. To begin with the blog example, use the following command:
rails new blog
This creates a new Rails application called Blog in the
Move into the
Start the built in server with the following command, replacing the IP address with your Linode’s IP address:
rails server --binding=198.51.100.0
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring. => Booting WEBrick => Rails 184.108.40.206 application starting in development on http://198.51.100.0:3000 => Run `rails server -h` for more startup options => Ctrl-C to shutdown server [2020-03-11 14:17:16] INFO WEBrick 1.3.1 [2020-03-11 14:17:16] INFO ruby 2.3.3 (2016-11-21) [x86_64-linux-gnu] [2020-03-11 14:17:16] INFO WEBrick::HTTPServer#start: pid=3089 port=3000
You can visit your application by visiting the address in the browser.
Exit the server process with Ctrl+C.
Create a Controller and View
A controller will receive requests which are then routed and served by various actions. A view displays information.
Create a controller called
Welcomeand an action called
rails generate controller Welcome index
With the text editor of your choice, edit the file
app/views/welcome/index.html.erband replace the contents with the following:
- File: app/views/welcome/index.html.erb
<h1>Hello, World! This is Ruby on Rails!</h1>
Tell Rails where to find the document root. Edit the file
config/routes.rb, find and uncomment the line root as shown:
- File: config/routes
Rails.application.routes.draw do get 'welcome/index' ... root 'welcome#index' ... end
Start the server again:
rails server --binding=198.51.100.0
You should see your new welcome page in the web browser.
For more information on setting up a more substantial application, refer to the Ruby on Rails Getting Started Guide.
NoteCurrently, Linode does not manage software and systems updates for Marketplace Apps. It is up to the user to perform routine maintenance on software deployed in this fashion.
For more on Ruby on Rails, checkout the following guides:
- Ruby on Rails with NGINX on Debian
- Ruby on Rails with Apache on Debian
- Use Unicorn and NGINX to Configure Ruby on Rails Applications on Ubuntu
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This page was originally published on