Articles on Rails

Eric Fung

Eric Fung

Migrating From Sprockets to Webpacker

Starting with Rails 6, Webpacker became the default asset compiler, replacing sprockets–better known as the asset pipeline. While the asset pipeline was a big step for its time in making it easy to package JS, CSS, and images, webpack has matured enough to do all of the above and more, due to modern JavaScript’s support

Will Ockelmann-Wagner

Will Ockelmann-Wagner

The Best of Both Worlds: HTML Apps & Svelte

At Carbon Five we try to be agile about our technology choices and pick the simplest tool for the job at hand. That means that even in 2019, the era of React and Redux and GraphQL and all the other fancy tools for client-side web applications, sometimes the best tool for our clients is a

Zoe Madden-Wood

Zoe Madden-Wood

Safely Migrating from Paperclip to Active Storage

Active Storage was introduced into Rails version 5.2. It is a highly anticipated addition to handle integrations with asset management such as AWS S3. For a long time, the field has been dominated by outside gems, including Paperclip, which has been around longer than many people have been Rails developers. Now that Active Storage has

Lenny Turetsky

Lenny Turetsky

An AJAX Auto-Save Implementation

For a recent client engagement, we were tasked with implementing auto-save on a multi-field form: any time any of the field values changed, we’d save the form to the server. This is a common scenario where users are composing longer inputs, such as emails, word processing, and spreadsheets.

Andrew Hao

Andrew Hao

Evented Rails: Decoupling complex domains in Rails with Domain Events

Raphael Koh In our last Domain-Driven Design discussion, we learned how to group similar business components into application Bounded Contexts, which were separated folders in our Rails apps. This segregated cohesive groups of application code into separate folder structures (bounded contexts), and gave us a jumping-off point to drawing more explicit boundaries between domains in

Christian Nelson

Christian Nelson

Rails Database Best Practices

Working on an oldish Rails project, I came across some smelly ActiveRecord code that begged for some refactoring love. I also spent some time speeding up pages with slow/many database calls. Between those two experiences, I felt the inspiration to write-up some “Back to Basics” Rails Database Best Practices. Rule #1: Let your Database do

Andrew Hao

Andrew Hao

Bring clarity to your monolith with Bounded Contexts

Check out the video of this talk from ElixirConf 2017 below Monolithic applications are great when you start building your company, but as time progresses, they become difficult to maintain. These codebases, as they grow, easily become Big Balls of Mud. When building large applications in frameworks like Rails, the very convention-over-configuration design principles that made

Andrew Hao

Andrew Hao

Rails, meet Phoenix: add Phoenix to your Rails ecosystem with session sharing

You’ve resolved to build your company’s Next Big Thing in Phoenix and Elixir. That’s great! You’re facing a problem though – all user authentication and access concerns are performed on your Rails system, and the work to reimplement this in Phoenix is significant. Fortunately for you, there is a great Phoenix plug to share session

Andrew Hao

Andrew Hao

Docker, Rails, & Docker Compose together in your development workflow

We’ve been trialing the usage of Docker and Docker Compose (previously known as fig) on a Rails project here at Carbon Five. In the past, my personal experience with Docker had been that the promise of portable containerized apps was within reach, but the tooling and development workflow were still awkward – commands were complex,

Matt Wean

Matt Wean

Adventures in Searching with Postgres: Part 2

In part one, we looked at querying 100,000 International Statistical Classification of Diseases (ICD) code records for 3-7 character codes. In part two of three, we’ll cover full-text search of the record descriptions using Postgres and Arel.

What can we help you with?

Tell us a bit about your project, or just shoot us an email.

Interested in a Career at Carbon Five? Check out our job openings.