This article is part of our Upgrade Rails series. To see more of them, click here.
This article will cover the most important aspects that you need to know to get your Ruby on Rails application from version 6.0 to 6.1.
Read moreThis article is part of our Upgrade Rails series. To see more of them, click here.
This article will cover the most important aspects that you need to know to get your Ruby on Rails application from version 6.0 to 6.1.
Read moreRuby 3.0 was released on December 25th 2020. We can now enjoy the great new features of this version, such as performance boost (we talked about that in this recent article), ractors for concurrency, fiber schedulers, and type checking.
If you already have an application running in production and want to be able to use such benefits you’ll need to upgrade your Ruby version.
This article will cover the most important aspects that you’ll need to know to get your Ruby application from version 2.7 to 3.0
Read moreI’m seeing a lot of disappointment about the speed of Ruby 3 out there. I think there are a lot of reasons for that, and I think they’re worth looking at.
So: why wasn’t Ruby 3 faster? Did it break its promise? (Spoiler: I don’t think so, but I understand why some people do.)
Read moreOne of the steps we recommend taking when doing an upgrade for any Rails version is to dual boot the application with your current Rails version and your next rails version.
This is important because it allows you to quickly run the test suite for both versions, having dual booting available allows you to debug and also revert to your current version in a much simpler fashion.
However, sometimes changes that you make for the new version of Rails may not be compatible with your current version of Rails. This means that you will need to use a few different techniques to get both versions to be able to use the dual booting and run smoothly.
Read moreIf you’ve been following me awhile, you know that I was hired by AppFolio years ago to measure Ruby 3’s performance, especially on Rails. This has been a long trip. And that very first project is finally over: Ruby 3 exists and I can check its final, released Rails performance.
If you have been following along, the numbers in this post won’t surprise you. But it’s important to do the final measurement. If you haven’t been following, this will bring you up to date.
Read moreWelcome to our series of Rails upgrade miniguides. Here you’ll find links to all of the relevant posts to help with an upgrade.
Read moreSometimes you will be caught between a rock and a hard place. For example: You really need to upgrade your Rails application because Heroku is discontinuing your stack in two weeks so you don’t have the time to write an entire test suite.
Sometimes the situation will be that your boss really needs you to upgrade Ruby or Rails to use a version that gets security updates and they won’t allow you to write tests beforehand.
This article will explain how to ship a Rails upgrade project without a test suite. If your application has no tests, you will learn how to upgrade without having to write tests first.
Read moreThis article is part of our Upgrade Rails series. To see more of them, click here.
This article will cover the most important aspects that you need to know to prepare your Ruby on Rails application for working on an upgrade.
Read moreIf you’re a developer you know the reasons why you should be using the latest Rails framework. You understand the implications of performance gains, dependency issues and unsupported versions.
But these big picture benefits get lost in translation when talking to non-technical executives. What they need to know is the business case for an upgrade, how the work will translate into increased revenue.
So, here is an article to use or forward to communicate why an upgrade should be a priority. We also wrote an article on the more technical reasons if you are interested.
Read moreRuby 3x3 is coming in about a month. One of its new concurrency primitives is Ractors, which used to be called “Guilds.” (The other new concurrency primitive is Autofibers.)
Ruby has a Global VM Lock (GVL), also called the Global Interpreter Lock (GIL), that prevents running Ruby code in more than one thread at once. So Ruby threads are great for I/O like waiting on files or databases. And they’re great for cases where a C extension can keep calculating in a background thread while a foreground thread runs Ruby. But you can’t do calculations in Ruby in more than one thread at once within the same process.
At least not until Ruby 3 and not without Ractors.
Great! Now how fast is the current implementation of Ractors?
Read moreWhen upgrading a Rails application, you might find that sometimes functionality is extracted from Rails and moved into a new gem. These gems are called shims, and they will basically allow you to keep using an old functionality, once the core API takes that out. You can also find shims in form of monkey patches. In this case it’s functionality that you develop to make your migration easier.
In this article I will list some of the functionality of past versions of Rails that was extracted into gems.
Read moreBack in 2011, Rails 3.1 introduced The Assets Pipeline feature using the Sprockets gem. This made it really easy to handle assets (images, fonts, JavaScript, CSS and more), solving many of the issues that developers had to face everyday.
In 2012, Webpack was released solving the same issues in a different way and in time became the most used solution to handle assets. And since Rails 6, Webpack became the default solution to handle JavaScript assets using the Webpacker gem on new Rails applications.
In this article I’ll explain the steps we took to migrate to Webpack to handle our JavaScript assets, and how we added support as a node module in our styleguide.
Read moreDo you ever look at the list of Amazon EC2 instance types?. Those are sizes of virtual machine you can rent to run your code on. Well, okay, they’re groups of sizes, since each one of those headings has a bunch of different sizes of VM…
So what type of EC2 instances should you run your Rails app on?
The answer is simpler than it looks.
Do you love numbers? I love numbers. Do you hate numbers? Skip to the bottom, there’s a nice summary paragraph. Do you really really love numbers? There are raw data dumps including all my intermediate results.
Read moreWhen inheriting a project or starting an upgrade, it is useful to understand how big and complex the application really is. So, what is a good way to understand whether a Rails application is tiny, medium, or huge?
The good news is that there are a couple of gems that make this easy for us.
In this article I will explain how you can use these gems to begin to understand the size and complexity of a Rails application.
Read moreThe new Ruby 3.0 preview is out! Woo-hoo!
If you’ve heard of me, you know performance is kinda my thing, especially Rails performance on large apps. I do other stuff too, but I got paid to do that for years (thanks, AppFolio!), so I’ve written a lot about it.
How does the new preview’s performance stack up on Rails? And how reliable are these numbers?
Read more