Birds of a Fiber: A look at Falcon, a modern asynchronous web server for Ruby

Falcon aims to increase throughput of web applications by using Ruby’s Fibers to continue serving requests while other requests are waiting on IO (ActiveRecord queries, network requests, file read/write, etc). Read more

Benchmarking Ruby Code

One of the joys of using the Ruby language is the many different ways that you can solve the same problem, it’s a very expressive language with a rich set of libraries. But how do we know which is the best, most efficient, use of the language? When we are talking about algorithms which are critical to the performance of your application, understanding the most efficient approach to take is essential. Perhaps you’ve been using Scout to hunt down issues, and now that you have found an issue, you want to optimize it. Ruby’s Benchmark module provides a very handy way for you to compare and contrast possible optimizations, and when used in conjunction with a good APM solution it will ensure that you have all bases covered. Let’s take a look at how you can get started with it today! Read more

What’s new in Rails 6?

With the official release of Rails 6 just around the corner, we round up all the major new features coming your way. It is an exciting release due to some big features coming upstream from the Basecamp and GitHub projects. Amongst the many minor updates, useful tweaks and bug fixes, Rails 6 will ship with two completely new frameworks: ActionText and ActionMailbox, and two big scalable-by-default features: parallel testing and multiple database support. So set your Gemfile to get Rails 6.0.0.rc1 and let’s get started! Read more

Unicorn vs. Puma vs. Passenger: which app server is right for you?

The Ruby app server ecosystem has consolidated around three app servers: Unicorn, Puma, and Passenger 5. What specific problems must an app server solve for Ruby? How do you pick the right app server? Read more

Making sense of ActiveRecord joins, includes, preload, and eager_load

Like a pair of jumper cables, ActiveRecord's joins , includes , preload , and eager_load methods are incredibly useful, but also very dangerous when used incorrectly. Knowing when and where to use each approach - and even when to combine them - can save you considerable trouble. Read more

Debugging with Rails Logger

If you’re a Rails developer, then you’ve probably used Rails Logger on at least one occasion or another. Or maybe you have used it without even realizing, like when you run ‘rails server’ and it prints information to the terminal window, for example. Rails Logger provides us with a powerful way of debugging our applications and gives us an insight into understanding errors when they occur. But are you using all of the Rails Logger features? There’s a good chance you are not! So let’s take a more in-depth look at the logging system in Rails, look at some of its more unknown features, and establish some best practices for our log creation in the future. Read more

Which Ruby Background Job Framework is Right for You

If you've been around the Ruby/Rails ecosystem for a bit you've likely heard the term 'background job' or 'offline processing'. But what does that actually mean? How do you know which tasks are suitable to be processed 'in the background'? Once you define those tasks, how do pick the right ... Read more

Building Docker Containers for our Rails Apps

How can we take our existing Ruby on Rails applications and run them inside a Docker Container? In a recent post, we talked about Docker containers, and what you should know about them. Hopefully we cleared up any confusion you might have had about the Docker ecosystem. Perhaps with all that talk, it got you thinking about trying it out on one of your own applications? Well in this post we’d like to show you how easy it is to take your existing Ruby on Rails applications and run them inside a container. So, let’s assume you have an existing Rails project with a PostgreSQL database, and let’s walk you through the steps it would take to run this in a container instead. It’s a lot easier than you probably think! Read more

The danger of Rails.env.production?

When I do a code review, one of the scariest things I see is logic like this: if Rails.env.production? do_additional_work end Why? Your beautiful tests and tightly integrated CI system won't execute that code. You won't see that code execute as you refresh your browser in development. From syntax errors ... Read more

Rails::API vs. Sinatra vs. Grape: which Ruby microframework is right for you?

Rails dominates Ruby web frameworks: the next most popular framework, Sinatra, has 5% of the popularity of Rails . However, that doesn't mean non-Rails frameworks like Sinatra and Grape don't have their place. When does it make sense to step away from ActionController and use another framework? What are the ... Read more

Start your free 14-day trial today.
No credit card needed.