Language Frankfurt, Germany

Deploy Ruby on Nodion

Nodion recognizes a Ruby app by its Gemfile. The Ruby buildpack installs your gems with the Bundler version from Gemfile.lock and starts Puma, a Rack app through rackup, or your app.rb. Sinatra and other Rack apps run this way in Frankfurt; for Rails, see the Rails guide.

Deploy to Nodion ›

from 1 EUR / month

Up to 15 € credit when signing up

Detected by
Gemfile
Start
Puma with config/puma.rb, else rackup with config.ru, else ruby app.rb
Ruby
3.3, 3.4 (default), 4.0
Region
EU Central (Frankfurt)

Deploy Ruby step by step

  1. Commit Gemfile and Gemfile.lock The build runs bundle install without the development and test groups, using the Bundler version from BUNDLED WITH in Gemfile.lock. With Rack 3, a config.ru app also needs the rackup gem and a server such as Puma. Gemfile
    source "https://rubygems.org"
    
    gem "sinatra"
    gem "rackup"
    gem "puma"
  2. Add a config.ru With a config.ru and no config/puma.rb, Nodion starts bundle exec rackup config.ru -p $PORT and sets RACK_ENV=production. A small Sinatra app fits into the file itself: config.ru
    require "sinatra/base"
    
    class App < Sinatra::Base
      get "/" do
        "Hello from Frankfurt"
      end
    end
    
    run App
  3. Create the app In the dashboard, create an application from your GitHub, GitLab, Bitbucket or Gitea repository, pick the branch and the region EU Central, and keep the build strategy on Buildpacks. Only variables with the Build flag exist during the build; all others are set at runtime. Mark API keys and passwords as secret.
  4. Attach a database and run migrations Create a PostgreSQL or MySQL database in the same region and attach it on the Environment tab; the app gets DATABASE_URL on the next deploy. A release: line in a Procfile runs once per build before the new version starts, for example the migrations of sinatra-activerecord. If it fails, the running version stays live. Procfile
    release: bundle exec rake db:migrate

Good to know

  • Pin the Ruby versionNodion reads .ruby-version, then a ruby line with a full version in the Gemfile; without either you get Ruby 3.4. Ruby 3.3 and 4.0 are available as well. Without BUNDLED WITH, Bundler 2 runs on Ruby 3 and Bundler 4 on Ruby 4.
  • Puma config or a plain app.rbIf config/puma.rb exists, Nodion runs bundle exec puma -C config/puma.rb, so bind Puma there with port ENV.fetch("PORT", 3000). With neither that file nor config.ru, Nodion runs bundle exec ruby app.rb, and the script has to listen on 0.0.0.0 and the PORT Nodion sets.
  • Sidekiq and other workersAdd worker: bundle exec sidekiq to the Procfile together with an explicit web: bundle exec rackup config.ru -p $PORT; without a web: line the first Procfile entry other than release: becomes the default command. Then add a process named worker without a port on the Processes tab. Valkey in the same region gives Sidekiq its REDIS_URL.

What Nodion runs for you

  • Deploys without downtime Push to your branch and Nodion builds a new release. Traffic switches once the new instances answer their health check; a failed release leaves the running one in place. Apps with a local volume restart instead, because the disk belongs to one instance.
  • Databases next to the app Managed PostgreSQL, pgvector, MySQL, Valkey and ClickHouse in the same region. Attached databases arrive as DATABASE_URL, REDIS_URL or CLICKHOUSE_URL.
  • Previews per pull request Turn on previews and pull requests from your repository get their own app with its own URL and fresh, empty databases, created automatically or by hand. Forks and bot pull requests are skipped.
  • Workers, cron jobs and scaling Run workers as extra processes of the same app, schedule jobs on the Cron tab, and scale every process to up to 16 instances.
  • Release step With buildpacks, a Procfile release: line runs with every new build. Dockerfile apps, and redeploys or rollbacks to an earlier image, use a release command set on the app itself, which also takes precedence over the Procfile line. On static sites a release step runs in an image that holds only the built files.
  • Logs and metrics Build, release and runtime logs plus CPU, memory, disk and network metrics for every instance in the dashboard.
  • Domains and HTTPS A default hostname with HTTPS from the first deploy; your own domains get certificates automatically.

Further reading

Ruby on Nodion: questions and answers

Does Sinatra run without a Dockerfile?

Yes. With a Gemfile and a config.ru, the Ruby buildpack installs your gems and starts the app with rackup on the port Nodion sets. For Rack 3, add the rackup and puma gems.

Which Ruby versions can I use?

Ruby 3.3, 3.4 and 4.0, with 3.4 as the default. Pin one in .ruby-version or the Gemfile; Bundler runs in the version from your Gemfile.lock.

Can I build JavaScript assets next to the Gemfile?

Use a Dockerfile for that: if the repository has one, the create form picks the Dockerfile strategy and your Dockerfile runs the whole build. For Rails, see the Rails guide.

Where does my Ruby app run?

In the EU Central region in Frankfurt, Germany. Build, registry, the app and its databases, volumes, buckets, logs and metrics stay in that region, and Nodion's API and control plane are hosted in Germany. Nodion GmbH is based in Stuttgart.

Can I use Ruby in line with the GDPR?

Nodion provides the basis for it: Nodion GmbH is based in Stuttgart, Germany, in the Frankfurt region the app, its databases and volumes run in Germany, and you conclude the data processing agreement (DPA) under Art. 28 GDPR electronically in the dashboard. Whether your setup complies also depends on how you configure and use the app.

How much does it cost to run Ruby on Nodion?

An app instance starts at 1 EUR per month. The setup in the cost box costs 2 EUR per month: App 2 EUR. Prices are net and billed per second, and you pick bigger sizes or more instances whenever you need them.

Can I use my own domain for my Ruby app?

Yes. Every app gets a default hostname with HTTPS. Add your own domain on the app's Domains tab; the TLS certificate is issued and renewed automatically.

Give your agent a cloud.

Earn up to 15 € in credit when signing up.

Continue with GitHub

or with email

Stay in the loop.

Product news, no spam. Unsubscribe anytime.