The easiest way to build & deploy a full-stack web app in today
A thread on how Rails handles everything out of the box (or with one well-supported gem/service)
1/Frontend & Backend⚙️Rails is full-stack! Want React?rails new myapp --javascript=esbuild && bin/importmap pin reactWant an API?rails new myapp --apiPrefer Hotwire? It’s built in.No extra setup needed.
2/HostingThe easiest way to deploy Rails today?Herokugit push heroku mainand you’re live. HTTPS, CDN, domains, & autoscaling included.Sign up:heroku.com
3/Database️PostgreSQL is the default & best choice for Rails.It’s baked in, just run:rails db:create db:migrateHeroku Postgres makes production setup painless.
4/AuthenticationDevise is the go-to gem for user auth:bundle add devise && rails g devise:installWant social logins (Google, Facebook, etc.)? :gem 'omniauth-google-oauth2'
5/File Uploads & StorageActive Storage is built into Rails!Supports S3, Cloudflare R2, etc.Just run:rails active_storage:install && rails db:migrateUpload files?has_one_attached :avatar
6/EmailAction Mailer is built in.For easy email delivery, usePostmark:gem 'postmark-rails'Setup inconfig.action_mailer.smtp_settingsSign up:postmarkapp.com
7/PaymentsStripe is the gold standard.Install:gem 'stripe'Create a checkout session in 5 lines of cs:stripe.com/docs
8/Background Jobs♂️Active Job is built in!For production, useSidekiq:gem 'sidekiq'Run workers with:bundle exec sidekiqDashboard:mount SidekiqWeb => '/sidekiq'
9/AnalyticsAhoy is the easiest way to track events:gem 'ahoy_matey'Want product analytics? :gem 'posthog-ruby'Sign up:posthog.com
10/MonitoringUseSentryto track errors & performance.gem 'sentry-ruby'One line setup:Sentry.init do |config| config.dsn = ENV['SENTRY_DSN'] endSign up:sentry.io
11/Dev Tools (CI/CD, Staging)GitHub Actions is free & easy for Rails.Add.github/workflows/ci.yml:
────────────────────────────────────────────────────────────────────
yamlCopyjobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
- run: /rails test
Docs:github.com/actions
12/Secrets ManagementRails 7 has encrypted credentials built in!Run:bin/rails credentials:edit --environment productionOr useDotenvfor.envfiles:gem 'dotenv-rails'
Final Gemfile Summary
────────────────────────────────────────────────────────────────────
rubyCopy# Authentication
gem 'devise'
gem 'omniauth-google-oauth2'
File Uploads
gem 'image_processing' # Used by Active Storage
Email
gem 'postmark-rails'
Payments
gem 'stripe'
Background Jobs
gem 'sidekiq'
Analytics
gem 'ahoy_matey'
gem 'posthog-ruby'
Monitoring
gem 'sentry-ruby'
Secrets Management
gem 'dotenv-rails'
Final Services List
Hosting:Heroku
DB:Heroku Postgres
Email:Postmark
Payments:Stripe
Analytics:PostHog
Monitoring:Sentry
Hosting:Heroku
DB:Heroku Postgres
Email:Postmark
Payments:Stripe
Analytics:PostHog
Monitoring:Sentry
Rails today is a complete, batteries-included framework
What’s your favorite Rails feature? ⬇️