The other day, I was setting up a client project when I came across this dreaded error when running bundle install
:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
Have you ever gotten this error and spent hours of your day trying to install the missing gems? In this article, learn why this error occurs and how to solve it for good.
Read more
These days, maintaining a secure codebase is crucial. Vulnerabilities in your application’s dependencies can pose significant risks to the security of your application. This is where tools like bundler-audit come into play. bundler-audit
is a gem that helps you identify and manage security vulnerabilities in your Rails application’s external dependencies. In this article, we will explore how to use bundler-audit
to keep your Rails codebase secure.
Read more
While working with a client, we noticed that they had two Gemfiles: one with gems specifically for development and local references to a gem, and the other with a reference to a resource on GitHub. They wanted to switch between the local installation of the gem and the external GitHub reference based on whether they were in development or production. This approach worked well for their needs; however, our team was concerned that one downside was the difficulty in maintaining two separate Gemfiles. In this article, we will discuss an approach to creating conditional Gemfiles for development.
Read more
Managing technical debt is a huge concern for businesses of all sizes. At FastRuby.io, we understand the challenges of maintaining a healthy codebase while continuously delivering value to your users. That’s why we’ve introduced Bonsai, our fixed-cost, monthly maintenance service tailored to gradually alleviate technical debt. Join us as we take a deep dive into the value Bonsai brings to the table over the course of a month.
Read more
This guide is for you if you have an internal gem and you don’t know if you need to upgrade it or don’t know what steps to take to upgrade it. We’ll cover everything you need to know in this post about upgrading internal gems.
Read more
Technical debt, a term coined by Ward Cunningham in the 1990s, refers to the trade-off between short-term gains and long-term consequences in the development process. In this article, we will explore what technical debt is, why it happens, why you should care about it, and discover some new tools to help you discover the technical debt in your Rails applications.
Read more
Ruby on Rails is a powerful web application framework that has evolved over the years, with new versions bringing in features, improvements, and security updates. As your application matures, keeping it up-to-date with the latest Rails version becomes crucial. However, the prospect of upgrading an entire Rails application can be daunting. In this blog post, we’ll explore whether it’s possible to upgrade your Rails application in increments and how to go about it.
Read more
Maintaining an up-to-date Ruby on Rails application is crucial for performance, security, and feature enhancements. However, finding the time for a full-scale upgrade can be challenging. In this blog post, we’ll explore practical steps you can take to delay a Rails upgrade when you don’t have the immediate bandwidth but want to set the stage for a seamless process in the future.
Read more
Security is a huge concern for web applications. To protect your Rails app from potential vulnerabilities and threats, it’s essential to perform regular security assessments. Brakeman, a widely used static analysis tool for Ruby on Rails, can help you identify security vulnerabilities proactively.
In this article, we’ll explore how to use Brakeman to check your Rails app for security vulnerabilities.
Read more
If you have ever upgraded Rails from 5.2 to 6.0, you might have run into issues with changes that had been made to the value of ActionDispatch::Response#content_type
between the two versions.
If you have been lucky, you might not have even noticed there was a problem until Rails 6.0, after coming across this deprecation message:
Rails 6.1 will return Content-Type header without modification. If you want just the MIME type, please use `#media_type` instead.
What happened with ActionDispatch::Response#content_type
between Rails 5.2 to 6.1? In this article, we will go into some background to learn what this method does, look at the differences in ActionDispatch::Response#content_type
’s return value between the several Rails versions, and how you can fix the problem if you come across it in your codebase.
Read more
At FastRuby.io, we don’t always run rails app:update
in our process to upgrade Rails apps.
It might seem like a sacrilege - after all, that’s why the task was created, to make upgrading Rails as painless as possible, right? But we have found while upgrading dozens of applications that running rails app:update
isn’t the best idea in all situations.
In this article, you will learn what rails app:update
does, when it should not be used, and how to upgrade your Rails app without it.
Note: In Rails versions before 5.0, rails app:update
was called rake rails:update
.
Read more
Have you ever tried to update a Rails app from 5.2 to 6.0, or
from 6.0 to 6.1?
If so, you might have seen this deprecation:
DEPRECATION WARNING: Dangerous query method (method whose arguments are used as raw SQL) called with non-attribute argument(s): "random()". Non-attribute arguments will be disallowed in Rails 6.0. This method should not be called with user-provided values, such as request parameters or model attributes. Known-safe values can be passed by wrapping them in Arel.sql(). (called from ...)
Note: While this deprecation message mentions Rails 6.0 as the version where the behavior is
disallowed, that change was postponed, so the deprecation also shows in Rails 6.0. The behavior is actually disallowed
in Rails 6.1.
What does this deprecation mean exactly? In this article, I will explain that in
plain English, what issue it is trying to prevent, and how to fix the problem
if you come across it in your codebase.
Read more
At FastRuby.io, we talk a lot about software quality. It’s how we determine whether a client is a good fit for an upgrade. The less technical debt a codebase has, the easier it is to maintain, and the more likely a Rails upgrade will go smoothly. But what determines whether software is “good quality”? In this article, we will talk about what software quality is, and explain the metrics that people use when talking about how to measure it.
Read more
At OmbuLabs, one of our specialities is upgrading Ruby on Rails applications through our specialized service called FastRuby.io. In this post, I want to share with you some of the things that I’ve learned while working on my first Rails upgrade client project as a less experienced Rails developer.
Read more