> ## Documentation Index
> Fetch the complete documentation index at: https://www.aptible.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Ruby on Rails - Starter Template

> Deploy a starter template Ruby on Rails app on Aptible

<CardGroup cols={3}>
  <Card title="Deploy Now" icon="rocket" href="https://app.aptible.com/create" />

  <Card title="GitHub Repo" icon="github" href="https://github.com/aptible/template-rails" />

  <Card title="View Example" icon="browser" href="https://app-52710.on-aptible.com/" />
</CardGroup>

# Overview

This guide will walk you through the process of launching the [Rails Getting Started example](https://guides.rubyonrails.org/v4.2.7/getting_started.html) from the Aptible Dashboard.

# Deploying the template

<Info>
  Prerequisite: Ensure you have [Git](https://git-scm.com/downloads) installed.
</Info>

Using the [Deploy Code](https://app.aptible.com/create) tool in the Aptible Dashboard, you can deploy the **Ruby on Rails Template**. The tool will guide you through the following:

<Steps>
  <Step title="Deploy with Git Push">
    <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/ruby1.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=96256d53258cc6e13216dbc8e89a66ae" alt="" width="2000" height="1000" data-path="images/ruby1.png" />
  </Step>

  <Step title="Add an SSH key">
    <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/ruby2.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=e207be0a7eb863176c65af7906f09f5d" alt="" width="2000" height="1000" data-path="images/ruby2.png" />

    If you have not done so already, you will be prompted to set up an [SSH key](/core-concepts/security-compliance/authentication/ssh-keys#ssh-keys).
  </Step>

  <Step title="Environment Setup">
    <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/ruby3.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=3f1c2f75f944a64f613a5b2e73bd040e" alt="" width="2000" height="1000" data-path="images/ruby3.png" />

    Select your [stack](/core-concepts/architecture/stacks) to deploy your resources. This will determine what region your resources are deployed to. Then, name the [environment](/core-concepts/architecture/environments) your resources will be grouped into.
  </Step>

  <Step title="Prepare the template">
    <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/ruby4.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=d903342f3d08fc201483957abccef969" alt="" width="2000" height="1000" data-path="images/ruby4.png" />

    Select `Ruby on Rails Template` for deployment, and follow the command-line instructions.
  </Step>

  <Step title="Fill environment variables and deploy!">
    <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/ruby5.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=249b7e4498403168cac4953860df1062" alt="" width="2000" height="1000" data-path="images/ruby5.png" />

    Aptible will automatically fill this template's required databases, services, and app's configuration with environment variable keys for you to fill with values. Once complete, save and deploy the code!
  </Step>

  <Step title="View logs in real time">
    <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/ruby6.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=f978f55674e2f3b3b402c919fb2f38d5" alt="" width="2000" height="1000" data-path="images/ruby6.png" />
  </Step>

  <Step title="Expose your app to the internet">
    <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/ruby7.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=0e1dae20dbf4e1357ff608032a80b439" alt="" width="2000" height="1000" data-path="images/ruby7.png" />

    Now that your code is deployed, it's time to expose your app to the internet. Select the service that needs an [endpoint](/core-concepts/apps/connecting-to-apps/app-endpoints/overview), and Aptible will automatically provision a managed endpoint.
  </Step>

  <Step title="View your deployed app 🎉" icon="party-horn">
    <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/ruby8.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=50dab00f12fa2b4ed94524a909ff8431" alt="" width="2000" height="1000" data-path="images/ruby8.png" />
  </Step>
</Steps>

# Continue your journey

<Card title="Deploy custom code" icon="books" iconType="duotone" href="https://www.aptible.com/docs/custom-code-quickstart">
  Read our guide for deploying custom code on Aptible.
</Card>
