Rails 7 new production install: from zero to deploy (Ubuntu 20.04 edition)

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • ruby-build

    A tool to download, compile, and install Ruby on Unix-like systems.

  • $ sudo apt update; sudo apt upgrade -y $ sudo apt install rbenv $ rbenv init # Follow instructions: append 'eval "$(rbenv init -)"' to ~/.bashrc $ source ~/.bashrc # or disconnect and reconnect $ mkdir -p "$(rbenv root)"/plugins $ sudo apt install git $ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build $ git clone https://github.com/rbenv/rbenv-vars.git "$(rbenv root)"/plugins/rbenv-vars $ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash $ rbenv install 3.0.3

  • rbenv-vars

    An rbenv plugin that safely sets global and per-project environment variables

  • $ sudo apt update; sudo apt upgrade -y $ sudo apt install rbenv $ rbenv init # Follow instructions: append 'eval "$(rbenv init -)"' to ~/.bashrc $ source ~/.bashrc # or disconnect and reconnect $ mkdir -p "$(rbenv root)"/plugins $ sudo apt install git $ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build $ git clone https://github.com/rbenv/rbenv-vars.git "$(rbenv root)"/plugins/rbenv-vars $ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash $ rbenv install 3.0.3

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • rbenv-installer

    Installer and doctor scripts for rbenv

  • $ sudo apt update; sudo apt upgrade -y $ sudo apt install rbenv $ rbenv init # Follow instructions: append 'eval "$(rbenv init -)"' to ~/.bashrc $ source ~/.bashrc # or disconnect and reconnect $ mkdir -p "$(rbenv root)"/plugins $ sudo apt install git $ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build $ git clone https://github.com/rbenv/rbenv-vars.git "$(rbenv root)"/plugins/rbenv-vars $ curl -fsSL https://github.com/rbenv/rbenv-installer/raw/main/bin/rbenv-doctor | bash $ rbenv install 3.0.3

  • Phusion Passenger

    A fast and robust web server and application server for Ruby, Python and Node.js

  • server { listen 80; listen [::]:80; server_name YOUR_DOMAIN.ORG; # If you deploy without DNS and SSL, you could leave servername blank like below # server_name _; root /home/deploy/APPNAME/current/public; passenger_enabled on; passenger_app_env production; passenger_env_var RUBYOPT '-r bundler/setup'; # Cf issue: https://github.com/phusion/passenger/issues/2409 # Uncomment if you use ActionCable and/or Turbo Streams # location /cable { # passenger_app_group_name APPNAME_websocket; # passenger_force_max_concurrent_requests_per_process 0; # } # Allow uploads up to 100MB in size client_max_body_size 100m; location ~ ^/assets { expires max; gzip_static on; } }

  • Capistrano rbenv

    Idiomatic rbenv support for Capistrano 3.x (by capistrano)

  • set :application, "APPNAME" set :repo_url, "[email protected]:USERNAME/APPNAME.git" # Also works with non-github repos, I roll my own gitolite server set :deploy_to, "/home/deploy/#{fetch :application}" set :rbenv_prefix, '/usr/bin/rbenv exec' # Cf issue: https://github.com/capistrano/rbenv/issues/96 append :linked_dirs, 'log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', '.bundle', 'public/system', 'public/uploads'

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts