Rails Icon

Rails

Ruby on Rails (Rails) is a web application framework written in Ruby.
88 Stories
All Topics

Shopify Engineering Icon Shopify Engineering

How to write fast code in Ruby on Rails

If I had to pick one engineering team to write up how they make (and keep) Rails running fast, it’d be Shopify’s. What a treat! Part of Shopify’s success with Ruby on Rails is an emphasis on writing fast code. But, how do you really write fast code? Largely, that’s context sensitive to the problem you’re trying to solve. Let’s talk about a few ways to start writing faster code in Active Record, Rails, and Ruby.

read more

Eileen Uchitelle github.blog

Running GitHub on Rails 6.0

Eileen Uchitelle shared the backstory of how they have GitHub running on Rails 6.0 just 1.5 weeks after its final release. 👏 As soon as we finished the Rails 5.2 upgrade last year, we started upgrading our application to Rails 6.0. Instead of waiting for the final release, we’d upgrade every week by pulling in the latest changes from Rails master and run all of our tests against that new version. This allowed us to find regressions quickly and early—often finding regressions in Rails master just hours after they were introduced. Upgrading weekly made it easy to find where these regressions were introduced since we were bisecting Rails with only a week’s worth of commits instead of more than a year of commits.

read more

Shopify Engineering Icon Shopify Engineering

Deconstructing the monolith

Shopify’s engineering team has been doing some serious engineering on their codebase: Shopify is one of the largest Ruby on Rails codebases in existence. It has been worked on for over a decade by more than a thousand developers. It encapsulates a lot of diverse functionality from billing merchants, managing 3rd party developer apps, updating products, handling shipping and so on. It was initially built as a monolith, meaning that all of these distinct functionalities were built into the same codebase with no boundaries between them. For many years this architecture worked for us, but eventually, we reached a point where the downsides of the monolith were outweighing the benefits. We had a choice to make about how to proceed. Click through for a breakdown of the benefits/drawbacks of monoliths and what they build to address the drawbacks without losing the benefits.

read more

Vladimir Dementyev Evil Martians

Rails 6: B-sides and rarities

Discover the lesser-known parts of the next major framework upgrade, appealing to mature applications that have been around for a while. Instead of focusing on “greatest hits,” we will walk you through B-sides and rarities that make this new release enjoyable in subtler ways. What B-sides and rarities are Vladimir speaking of? While the most-advertised Rails 6 features like Action Mailbox and Action Text steal all the spotlight, it is unlikely that a real-life Rails application that has been around for a while will benefit from the ease of building WYSIWYG text editors right after the upgrade. At the same time, less flashy features like multiple databases support or parallel testing can bring immediate gains to your productivity—and Rails 6 has enough of those to offer if you know where to look.

read more

Rails chanind.github.io

Why I miss Rails

David Chanin: I know Rails isn’t universally beloved by developers, and I’m not suggesting that we give up React and es7 and go back to writing server-templated web-apps like it’s 2012 again. There’s a false dichotomy here. You don’t have to give up React to write server-templated web-apps. That being said, I understand what he’s trying to say. However, I do think that in the transition to the modern web stack (something like React / nodejs / graphql / etc), we’ve unsolved some of what tools like Rails made easy 10 years ago - and I don’t think it needs to be that way. This post is less a love song to Rails as it is a pitch for the value of unified frameworks in web development.

read more

David Heinemeier Hansson Ruby on Rails blog

Action Mailbox for Rails 6

DHH announced on the Ruby on Rails blog the details behind Action Mailbox, the second brand new framework coming to Rails 6 (the first was Action Text). Action Mailbox routes incoming emails to controller-like mailboxes for processing in Rails. The framework was, like Action Text and Active Storage, extracted from Basecamp 3. We’ve been using a related approach to route everything from forwarded emails to email replies to messages and discussions. After extracting the ideas into Action Mailbox, we reintegrated the framework into Basecamp, and we’ve been running the code we’re sharing today for over a month in production.

read more

The Changelog The Changelog #327

Untangle your GitHub notifications with Octobox

Jerod is joined by Andrew Nesbitt and Ben Nickolls to talk Octobox, their open source web app that helps you manage your GitHub notifications. They discuss how Octobox came to be, why open source maintainers love it, the experiments they’re doing with pricing and business models, and how Octobox can continue to thrive despite GitHub’s renewed interest in improving notifications.

read more

David Heinemeier Hansson weblog.rubyonrails.org

Rails 6 will provide a built-in rich text editor

DHH announces Action Text, a big new feature coming to Rails 6: It’s an integration between the Trix editor, Active Storage-backed file and image processing, and a text-processing flow that ties it all together. With Action Text, you really shouldn’t ever have to impoverish your users with a vanilla textarea ever again! I’m a bit torn on this. On one hand, Trix is a good tool and many (most?) web apps need rich text editing at some point in their lifespan. On the other hand, it’s difficult to build general purpose features like this that span both the front and back ends of the stack. Rails 6 is a ways away (with betas starting in early 2019), so we’ll have to wait and see. Regardless of whether this particular feature pans out, it’s great to see the Rails team continue to innovate and try new things.

read more

Eileen Uchitelle GitHub Blog

Upgrading GitHub from Rails 3.2 to 5.2

Eileen Uchitelle: In total the project took a year and a half to upgrade from Rails 3.2 to Rails 5.2. Along the way we took time to clean up technical debt and improve the overall codebase while doing the upgrade. Below we’ll talk about how we upgraded Rails, lessons we learned and whether we’d do it again. Congrats to Eileen and the team on this massive effort! Click through to read how they did it and the lessons the learned along the way.

read more

Miguel Michelson Martinez github.com

Stories — a self hosted Medium platform built with Ruby on Rails

Looks-wise, this is an exact design clone too. Hope that doesn’t get anyone who uses this “as is” in any trouble with the real Medium. This project is a fork of a Medium clone which began as Ken Hibino’s personal side project to learn Rails and React. I upgraded and refactored parts of the Rails app and integrated Dante2 wysiwyg editor. If you’re looking for commentary around the project or Rails, check Hacker News.

read more

The Changelog The Changelog #310

Open sourcing the DEV community

We talk with Ben Halpern the founder and webmaster of dev.to — a community for developers to talk about software. Last Wednesday they open sourced the codebase of the dev.to platform, so we wanted to talk through all the details with Ben. We talked through the backstory, how Ben realized this could become a business, how the team was formed, their motivations for open sourcing it and why they didn’t open source it from the start, the technical stack, and their vision for the future of the site.

read more

Rails medium.com

Powering your Ruby & Rails development with Pry

I use Pry (a runtime developer console) all the time and I still learned a few tricks from this post. Here’s a doozy for working in Rails apps: there’s show-routes , which does what the name implies, and also takes a -G flag for grepping. No more starting up a new shell to execute rake routes | grep login and wait for it to boot up Rails just to give us the routes on the side! This is the one and only tool that i miss when working with Elixir and Phoenix. Yes, I know there’s IEX.pry built in, but it doesn’t offer as smooth a workflow as Ruby’s pry. Maybe someday…

read more

Rails rollbar.com

Top 10 errors from 1000+ Ruby on Rails projects (and how to avoid them)

Nice post by our friends at Rollbar: We looked at our database of thousands of projects and found the top 10 errors in Ruby on Rails projects. We’re going to show you what causes them and how to prevent them from happening. If you avoid these “gotchas,” it’ll make you a better developer. I know many of these like the back of my hand. 🤣…😭

read more

Elixir infinum.co

Things I wish ActiveRecord had after using Ecto

Great list, and I agree with many of Vladimir’s points. However, I have to admit that Ecto’s take on preloading still bugs me after years of use. I find myself doing the preload dance all over the place even when I’m well aware of the performance issues around N+1 queries. I thought I’d get used to it over time, but it still irks me every time I see an Ecto.Association.NotLoaded exception.

read more

The Changelog The Changelog #274

Faktory and the future of background jobs

Mike Perham is back for his 4th appearance to talk about his new project Faktory, a new background job system that’s aiming to bring the best practices developed over the last five years in Sidekiq to every programming language. We catch up with Mike on the continued success and model of Sidekiq, the future of background jobs, his thoughts on RocksDB in Faktory vs BoltDB, Redis, or SQLite, how he plans to support Sidekiq for the next 10 years, and his thoughts on Faktory being a SaaS option in the future.

read more

The Changelog The Changelog #270

Rails as a Day Job, Diesel on the Side with Sean Griffin

Sean Griffin joins the show to talk about doing Rails full-time, his love of Rust. and his project Diesel - a safe, extensible ORM and query builder for Rust. We discuss Sean’s path to working full-time on Rails, what he works on specifically, why Rust, why Diesel, and how much of Diesel’s design and featureset is a product of his experience with ActiveRecord and Rails.

read more

0:00 / 0:00