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 have no monthly fee; compute is metered by the minute once you deploy, from around $5/mo for the smallest app.
- A git provider connected to your Primcloud account; see Source Control.
- 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 you've connected to Primcloud.
1. Create the application#
Hit Import Git Repository on the applications list, then:
- Select your fork of
ruby-getting-started. - Configure the branch (
main) and a region. - Verify the commit and hit Import.
2. Deploy#
The first deployment starts as soon as the app is created, and its build log streams live:
- Detection. Primcloud sees the
Gemfile.lockat the repo root and picks the Ruby toolchain. - Build. Ruby and Bundler are installed at the versions the lockfile pins,
bundle installruns against yourGemfile, and, because the sample is Rails,rake assets:precompileruns as well. - Start. Primcloud starts the
webprocess. NoProcfileis required: the sample'srailtiesgem triggers the defaultbin/rails servercommand.
When the deployment's Rollout phase shows Complete, the app is live.
3. Reach the app#
Click the *.primcloud.app URL in the dashboard header to open the app.
If it doesn't come up:
- Deployments: the build log has the raw output from
bundle installand 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 thewebformation; the default Rails and Rack commands Primcloud generates already read from it.
Where to go next#
- Deploying a different Ruby app: Ruby on Primcloud for detection,
bundle installbehavior, and process type inference. - Pinning to a specific Ruby version: Runtime versions.
- Using a private gem source: Package managers.
- Overriding rake behavior or the publish command: Customizing the build.
- Something breaking: Troubleshooting Ruby.
- Rails specifics: Deploying Rails.