A short introduction to the rdbg/debugger extension for VS Code, plus a guide on how to set it up correctly to debug your Ruby on Rails applications, as well as your RSpec specs. The VS Code extension takes 5 minutes to setup and it's great!
All Articles (25)
- Setting up VS Code for Ruby on Rails development can be tricky, so I wrote this article to help. In it, I share different VS Code extensions for things like autocomplete, linting, formatting and more! I've even put together a handy extension pack to get you setup fast.
- Work on Rails 8 is starting, so I dug through the official GitHub milestone to break down all the upcoming goodies for you. There's plenty coming, including Solid Queue, Solid Cache and Kamal becoming defaults, better support for PWAs, an official LSP, and more!
- This short guide shows you how to use VS Code to edit secrets in your Ruby on Rails app when you run `rails credentials:edit`. I also include a handy `bin/credentials:edit` script to simplify things.
- ActionMailer makes it easy to attach files to your emails. In this article, I show you how to attach single or multiple files, set custom encodings and mime_types, and attach images as inline attachments to display in your email body.
- In this article, I share tips for writing Rails ViewComponents, based on my experience building RailsNotes UI, and other projects. If you use ViewComponents in your Ruby on Rails apps, read this article!
- In this article, I break down the difference between system specs and feature specs in RSpec and Rails, and walk you through refactoring your feature specs to system specs.
- This article explores a dynamic nav component I built using the current_page? helper method, plus Rails' conditional class helpers. The result? A simple, dynamic navbar component, with different styling based on current page. Plus I threw in the ViewComponent version too 😉
- This is a super short article on how to add a favicon to your Ruby on Rails app. We combine the favicon_link_tag helper with asset_path, which makes it quick and easy.
- In this article, I share a handy Stimulus controller for adding tabs to your Rails apps. I also show you a different variation of the controller, and how to add it to your views. Plus, I've included a handy tip to avoid the annoying "flashing in" effect that can happen if you're not careful.
- This article covers everything you ever wanted to know (and more) about previewing emails and ActionMailer templates in Ruby on Rails. I cover native ActionMailer previews, the letter_opener gem, MailCatcher and MailHog. I've tested them all, and I cover how to use them, and their pros and cons.
- If you're sick of typing rails console all day, or just want to learn about a cool Rails command, I've got something that you're going to like — the rails runner command.
- This method to split your database seeds by Rails environment is clean and simple, and is perfect to split up your `seeds.rb` file. It's a brilliant method! I just wish I'd thought of it first 😅
- Overmind is a Procfile manager on steroids — like Foreman and bin/dev, but... a lot better. It's deeply configurable, and integrates with tmux so you can stop, restart and attach to running processes.
- Hotwire and Turbo Frames make it easy to add lazy-loading into our Rails apps — I'm talking only 12 lines of code! Plus, we can use TailwindCSS to create a skeleton loader for our Turbo Frames.
- We use the faker gem to seed our database with 10,000 fake posts. Then, we're going to speed up seeding by 9.4x, using either upsert_all or the activerecord-import gem.
- A handy reference for generating migrations in your Ruby on Rails app — I cover the basics like adding columns and tables, adjusting column types (and loads more), plus some tips and tricks...
- Here are the basics of installing Redis and Sidekiq, and then adding Redis and Sidekiq to your Ruby on Rails app. This is everything you need to get set up — no fluff, just a couple of commands. Let's go!
- Rails 7 introduced a lot of new things, but honestly, the `bin/dev` script is the thing I notice the most. I want to try to give your some insight into how `bin/dev` and `Procfile.dev` work together...
- This is the ultimate Dokku + Ruby on Rails guide — I cover running Dokku on x86 and ARM, deploying Sidekiq and Redis, dockerizing our Ruby on Rails app, and more...
- So, you're new to Stimulus and want to try it out in your Ruby on Rails app. Or perhaps you just need a simple toggle pattern to follow. Either way, you're in the right place...
- Most Rails apps probably don't need a React or Vue frontend. With a few lines of Rails and Hotwire magic, we can build a live frontend. That's what we're going to be doing today...
- A deep dive into the basics of Rails credentials, explore their benefits and drawbacks, and showing you how easy it is to integrate this powerful tool into your Rails app development process...
From API calls to ActionMailer — Refactoring a Rails App to Use ActionMailer for transactional email
How I switched from using direct SendGrid API calls to implementing ActionMailer for cleaner, more manageable code. Our final implementation will take us from 36 lines of code, down to 1 ...- A full guide for deploying a Ruby on Rails app to Render with a database, Redis, Sidekiq, and Cron jobs. This guide steps you through deploying your Rails app to Render, including setting up Redis, Sidekiq and Cron jobs to give you a great production-ready starter.
Join 1050+ Ruby on Rails lovers
Join 1050+ Ruby on Rails lovers and get our weekly newsletter, no spam. Just interesting Rails articles, from here and around the web.