Development environment: Linux
This course sets up a complete Rails development environment on Ubuntu and other Debian-based distributions. It starts with why Linux matches production, then covers apt and build-essential, the bash and zsh shells with dotfiles and PATH, and installing Ruby with rbenv and ruby-build. It continues with PostgreSQL, including peer authentication and how Rails connects through the local socket. It then configures VS Code with Ruby LSP and other extensions. The last lesson creates a Rails app with PostgreSQL, boots it with Puma and uses the console.
What you'll learn
- ✓Installing system packages, compilers and libraries with apt and sudo
- ✓Configuring bash or zsh with dotfiles, PATH, aliases and environment variables
- ✓Installing and switching Ruby versions with rbenv and ruby-build
- ✓Running PostgreSQL with systemd and using peer authentication from Rails
- ✓Setting up VS Code with Ruby LSP, a linter and GitLens
- ✓Creating, booting and exploring a Rails app backed by PostgreSQL
Why Linux is the developer's home
Here is a fact that changes how you should think about your laptop: almost every Rails application in the world runs on Linux in production. When you deploy to a VPS, to Heroku, to Fly.io, or to a Kubernetes cluster, your code runs on a Linux machine.
Read the full lesson free →Curriculum
7 lessonsWhy Linux is the developer's home
Explains why developing on Linux matches production and outlines the tools, distributions and system checks used.
apt & build-essential: your package manager and compilers
Uses apt and sudo to update the system and install build-essential plus the libraries Ruby needs.
The Linux shell: bash, zsh and your dotfiles
Compares bash and zsh and covers dotfiles, PATH, aliases, environment variables and file permissions.
Installing Ruby with rbenv on Linux
Installs Ruby with rbenv and ruby-build, sets per-project versions, and installs Bundler and Rails without sudo.
PostgreSQL on Linux
Installs PostgreSQL as a systemd service, creates a role for peer authentication, and connects Rails through the socket.
VS code on Linux for Rails
Installs VS Code from Microsoft's repository and sets up Ruby LSP, a linter, GitLens and useful settings.
Putting it all together: your first Rails app on Linux
Creates a Rails app with PostgreSQL, boots it with Puma, adds a home page and opens the console.