Home » Ruby (page 11)

Ruby

Your Preproduction Checklist for Your Rails App

Before we dive in to this extended preproduction checklist for a Rails app, you might ask, “Aren’t Brakeman and ongoing pull request reviews enough?” Sure, SQL injection problems might be found with automatic tools, which is great. They’re getting better all the time. But they still may miss some problems. For example, they can’t find vulnerabilities in the application logic. ...

Read More »

Folding Postgres Window Functions into Rails

You’ve heard of window functions in PostgreSQL, but you aren’t quite sure what they are or how to use them. On the surface they seem esoteric, and their use cases are ambiguous. Something concrete would really help cement when window functions are the right tool for the job. We have our work cut out for us! Through this post we’ll ...

Read More »

Building a JSON API with Rails 5

Rails is great for making traditional server-rendered web applications. It has support for cookies, sessions, and other browser-specific functionality right out of the box. It’s also great for building JSON APIs, but why include a whole bunch of functionality that we aren’t going to use if what we want is to simply build a JSON API? That’s where using Rails ...

Read More »

How to Write Smoke Tests for an Ember Rails Stack

The following story shows the importance of smoke tests when writing an app using the Ember+Rails stack. It covers the most basic example, and even then things go awry. In addition, it shows an example of an end-to-end test and some of the difficulty in setting up an environment for smoke tests. Finally, it mentions exhaust, a library that can ...

Read More »

How to use Rails Active Job

You’re always striving to give your users a better experience when they use your website or application. One of the most important ways to achieve this is by giving them quick server response times. In this article, we’ll explore how to use Rails Active Job to enable us to do this through the use of a queuing system. You can ...

Read More »

Non-Rails Frameworks in Ruby: Cuba, Sinatra, Padrino, Lotus

It’s common for a Ruby developer to describe themselves as a Rails developer. It’s also common for someone’s entire Ruby experience to be through Rails. Rails began in 2003 by David Heinemeier Hansson, quickly becoming the most popular web framework and also serving as an introduction to Ruby for many developers. Rails is great. I use it every day for ...

Read More »

WebSockets in Rails 4

I previously published this article on my personal blog early 2013, but thought I’d share it today with our Codeship readers. Enjoy! I’ve been using Rails 4 (beta) a lot recently. In a previous post we looked at how ActionController::Live can be used with Server-Sent Events, but the problem with that is that there’s no way for the client to ...

Read More »