Home » Ruby (page 10)

Ruby

Statefulness in a Stateless Language: Elixir

Elixir is blazing fast and highly concurrent. It’s functional, but its syntax is simple and easy to read. The language evolved out of the Ruby community and took many of Ruby’s core values with it. It’s optimized for developer happiness, and testing is a first-class citizen. When approaching a new language, it’s important to go back to the basics. One ...

Read More »

Running a Rails Application on Deis

In the last couple of years, we have seen a lot of development in the devops field. It’s becoming much easier for developers to provision servers and deploy their applications on those servers just with a couple of key strokes. Since the start of the SaaS and PaaS products (even before we knew them as that), we have seen a ...

Read More »

Building Cross Model Search with Ember, Part II

In Part One of this two part series, we covered how to integrate Elasticsearch and Rails to query against multiple models. To illustrate this, we started a Rails app for an ecommerce store named Tember. It includes an Elasticsearch index made up of four different models using Toptal’s Chewy gem. Today we’re going to pick up where we left off ...

Read More »

Unit Testing in Ruby

In his article on Unit Testing, Martin Fowler mentions that what a unit actually is can change depending on what school of thought you come from. Many from the object-oriented world consider the Class as the unit, whereas those in the functional programming world consider the Function the unit. Even though Ruby is an object-oriented language, I tend to see ...

Read More »

Speeding Up Bulk Imports in Rails

This article is about speeding up bulk imports in Rails. Let’s imagine we have 50,000 products to import… not an absurd amount, but enough that we can start to notice some pain and enough that we wouldn’t want to keep the user sitting there while the system tries to import them all. That is unless we can figure out a ...

Read More »

Using Docker for Rails Development

Over the first weekend in October, more than two hundred developers gathered in Ghent for ArrrrCamp, a serious-yet-pirate-themed Ruby conference. I was happy to deliver a talk on using Docker for Rails development. Below is a condensed version of the talk, which covers an introduction to containerization and the Docker ecosystem, as well as some examples of running Rails applications ...

Read More »

The Definitive Guide to Ruby Heap Dumps, Part II

Hopefully, from the first post in this two-part series, you’ve got a good sense of the type of information included in Ruby heap dumps and how to dig into it. Now we’ll generate a heap dump off of a Heroku dyno and analyze it. To begin, you’ll need a production app running on Heroku, an AWS account, and S3 credentials ...

Read More »

The Definitive Guide to Ruby Heap Dumps, Part I

In my last post, we looked at how you can dig into memory “leaks” on Heroku. These techniques all work well if you can reproduce the memory bloat locally. When you can’t, we can take a “heap dump” off of a running production server and analyze it for more information. In this two-post series, we’ll look at the basics of ...

Read More »

Building Cross Model Search with Ember, Rails, Elasticsearch

With its accurate algorithms and autocomplete UI, Google has set the bar extremely high for web apps implementing custom search features. When a user searches your website, they don’t expect their query to only get results for one type of entity. For example, if you had a grocery store web app and someone searched for “banana,” the query results could ...

Read More »