Product docs and API reference are now on Akamai TechDocs.
Search product docs.
Search for “” in product docs.
Search API reference.
Search for “” in API reference.
Search Results
 results matching 
 results
No Results
Filters
Deploy Ruby on Rails through the Linode Marketplace
Quickly deploy a Compute Instance with many various software applications pre-installed and ready to use.
Ruby on Rails is a server-side web application framework that allows web designers and developers to implement dynamic, fully featured web applications.
Deploying a Marketplace App
The Linode Marketplace lets you easily deploy software on a Compute Instance using Cloud Manager. See Get Started with Marketplace Apps for complete steps.
Log in to Cloud Manager and select the Marketplace link from the left navigation menu. This displays the Linode Create page with the Marketplace tab pre-selected.
Under the Select App section, select the app you would like to deploy.
Complete the form by following the steps and advice within the Creating a Compute Instance guide. Depending on the Marketplace App you selected, there may be additional configuration options available. See the Configuration Options section below for compatible distributions, recommended plans, and any additional configuration options available for this Marketplace App.
Click the Create Linode button. Once the Compute Instance has been provisioned and has fully powered on, wait for the software installation to complete. If the instance is powered off or restarted before this time, the software installation will likely fail.
To verify that the app has been fully installed, see Get Started with Marketplace Apps > Verify Installation. Once installed, follow the instructions within the Getting Started After Deployment section to access the application and start using it.
Configuration Options
- Supported distributions: Ubuntu 20.04 LTS
- Recommended minimum plan: All plan types and sizes can be used.
Ruby on Rails Options
- Rails Application name (required): The name for your rails application.
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
blog
directory.Move into the
blog
directory:cd blog
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 4.2.7.1 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
Welcome
and an action calledindex
:rails generate controller Welcome index
create app/controllers/welcome_controller.rb route get 'welcome/index' invoke erb create app/views/welcome create app/views/welcome/index.html.erb invoke test_unit create test/controllers/welcome_controller_test.rb invoke helper create app/helpers/welcome_helper.rb invoke test_unit invoke assets invoke coffee create app/assets/javascripts/welcome.coffee invoke scss create app/assets/stylesheets/welcome.scss
With the text editor of your choice, edit the file
app/views/welcome/index.html.erb
and replace the contents with the following:- File: app/views/welcome/index.html.erb
1
<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
1 2 3 4 5 6 7 8 9
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.
Next Steps
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
More Information
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