Docs menu

Getting started with Ruby

Deploy a minimal Ruby web app to Primcloud end-to-end using a sample repo, in about five minutes.

On this page

This guide takes a small Ruby web app from a repo to a live URL on Primcloud. You'll fork a sample repo, import it, watch the build stream, and open the deployed app at its *.primcloud.app address. Five minutes, start to finish.

Before you start#

You'll need:

  • A Primcloud account. Standard accounts are free to create; compute is metered by the minute once you deploy, from around $5/mo for the smallest app.
  • A git provider connected to your account with access to at least one repo.
  • Optional: Ruby 3.3 or newer installed locally, if you want to run the sample or make changes before deploying.

The sample app#

For this guide, use Heroku's heroku/ruby-getting-started repo. It's a minimal Rails app that builds cleanly under Primcloud's Ruby runtime with no changes. Fork it into an account your connected provider can see, so Primcloud can pull from it.

1. Create the application#

From the Primcloud dashboard, hit Import Git Repository on the applications list. The import wizard walks you through three quick steps:

  1. Pick a repository: select your fork of ruby-getting-started.
  2. Configure the deployment:
    • Branch: main (the fork's default).
    • Region: US East (NYC).
  3. Review and create: Primcloud auto-provisions the app's primary *.primcloud.app subdomain on the production environment.

2. Deploy#

The first deployment kicks off automatically when the app is created. Watch it stream in the Deployments tab:

  • Detection. Primcloud sees the Gemfile.lock at the repo root and picks the Ruby toolchain.
  • Build. Ruby and Bundler are installed at the versions the lockfile pins, bundle install runs against your Gemfile, and, because the sample is Rails, rake assets:precompile runs as well.
  • Release. Primcloud starts the web process on the pod formation. No Procfile is required: the sample's railties gem triggers the default bin/rails server command.

When the deployment status flips to Release Succeeded, the app is live.

3. Reach the app#

The application dashboard shows the assigned *.primcloud.app URL in the header. Click it, and the sample app's homepage loads.

If it doesn't come up:

  • Deployments: the build log has the raw output from bundle install and the rake tasks.
  • Logs: runtime output from your app streams there, including any startup errors.
  • Confirm the app binds to the port in $PORT. Primcloud sets this env var on the web formation; the default Rails and Rack commands Primcloud generates already read from it.

Where to go next#