Home » Ruby (page 10)

Ruby

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 »

Architecting Rails Apps as Microservices

Rails apps come in many shapes and sizes. On the one hand, you have large monolithic applications where the entire application (admin, API, front-end, and all the work it needs to perform) is in a single place. On the other end of the spectrum, you have a series of microservices, all communicating with each other with the goal of breaking ...

Read More »

Heroku Style Application Deployments with Docker

In this article, we describe how you can use Kontena’s experimental features for deploying application with Kontena just like with Heroku! Developing and deploying applications to Heroku was revolutionary when it was introduced. A developer could just focus on developing a killer app instead of configuring servers and build scripts. Heroku, just like many other platform-as-a-service (PaaS) solutions, allows developers ...

Read More »

Deploying Your Docker Rails App

In a previous article by Marko Locher, we learned how to run a Rails development environment in Docker. Marko also wrote about how to test a Rails app with Docker. So assuming we have our dev environment set up, our app is tested (and the tests are passing), we’re ready to think about deploying our application to production. If you ...

Read More »

Alternative Service Communication Using Pub/Sub

The HTTP protocol was designed for synchronous communication between two entities — for instance, a browser requesting a stylesheet or a server charging with a payment processor. Those are synchronous operations where nothing can proceed without an immediate response. Often communication can be asynchronous, like when queueing up work to be performed in the background. It is possible to use ...

Read More »

How to Find Ruby Code Smells with Reek

Your Ruby code smells. And it’s okay — mine does, too! Maybe it has some long methods with too many parameters, a few classes that try to do too much, an uncommunicative name here or there. No codebase is perfect, but it’s worthwhile to be aware of its deficiencies and refactorings that could improve the state of things — so ...

Read More »