RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
August 21, 2014
Do you know someone who teaches a class or workshop on Rails? I offer my book for beginners, Learn Ruby on Rails, to students enrolled in classes or workshops. See my blog post for details: ‘Learn Ruby on Rails’ Free for Students.
The 1.1 release of Reform brings better reusability for DRY form objects, simplifies and fixes lots of things and allows deserializing JSON and more, to make forms part of your HTTP API, too.
August 20, 2014
I just posted a write-up of using ActiveRecord's .pluck if you only need a subset of model attributes. Check it.
Wanna a complete, quick and easy way to validate email address? It validates not only the format, but also domain address. You can check it here .
August 19, 2014
Rails' i18n library is more powerful than it looks. You don't need to only use it for translation. The i18n library is useful anywhere you want to decouple the text you display from the place you display it. I'm going to share a few of the things that we learned that have come in handy, along with a crazy abuse of the library that ended up working out incredibly well for us.
Rails bundles default 404 (file not found), 422 (unprocessable entity), and 500 (internal server error) pages into every newly generated application. While they get the job done, these pages are pretty bland, so in this post I’ll show you how to update them to suit the logic and design requirements of your application.
How to avoid creating additional columns for child classes using RoR 4 and PostgreSQL 9.3, with an example based on social media users data: Renewed Life for STI with PostgreSQL JSON type.
August 18, 2014
I use the Rails console repeatedly throughout the day, but peering into object data can be a bit difficult due to poor formatting. Fortunately, a great gem called Awesome Print can bring an end to the formatting blues. In this blog post I introduce Awesome Print, and show you how to integrate it into your Rails console.
Subdomains can be a tricky thing to work with. So, we thought we'd share some tips to develop and test Rails applications using them.
So, now we came to a point where our app no longer fit to vanilla MVC and we want to extract a service layer. By “Service Layer” I mean a collection of Plain Old Ruby Objects, which hold pure business logic.

But the question is – where do we put them in our Rails app files structure?

We got several options here: [read more]
August 17, 2014
Green Ruby News #80
I just posted fresh with the week cool news for open minded rubyists.
Using Cloud Formations at AWS is an incredible way of building repeatable infrastructure, learn more about how it works and get to know cfn-bridge as well, a gem that aims to fill in the gaps not covered by the Cloud Formation API yet.
tl;dr Go to and get MyGem.configure do ... end configuration functionality (plus bonus).

In nearly every gem written there is some lines doing configuration. Although there seems to be a broad consensus on the MyGem.configure do ... end idiom, everybody has their own version of doing it, or is at least is copy-pasting the same code into the gem.

Configurations is a lightweight gem aiming at fixing that.

It lets you implement everything from an arbitrarily configurable object down to a type restricted configuration, so you can focus on writing exciting code without getting stuck implementing a configuration.

Works on nearly every Ruby version, has no dependencies, and is 11 KB to download (oh the bloat!)

Configurations - A delicious hash wrapped in a basic object, and nothing more. Try it today!
I've bundled up the sport.db.admin web app (- demo running on heroku -) into an easy-to-use command line tool, that is, sportweb for (local) use on your own machine. Let's say you have an SQLite database - e.g. football.db - in your folder, than just type $ sportweb and that's it - open your browser (e.g. use localhost:3000) and start browsing your local SQLite sports database. Cheers.
Final post on looking into the Gem Main check it out!
August 16, 2014
RailsApps Update for Devise 3.3
Devise default views now say “Log in” instead of “Sign in.” And the wording of error messages has changed. My blog post on the RailsApps Update for Devise 3.3 contains links for the details.
August 15, 2014
Released update to equatable to help implementing equality comparison in ruby objects.
Semaphore, a hosted CI & deployment service is now free to use fo open source projects. There are also accounts for open source organizations, coupled with public profiles to show off your work. :)
This week/s I have been mostly programming Ruby and Go, occasionally thinking about monoliths and services. My general feeling at the moment on rearchitecting your app is nope. Push it out as far as you can and take steps to postpone the inevitable (in Rails land, that’s engines, components and gems). Feel the Vibe
The new Cells view model allows replacing helpers and partials with a clean, encapsulated component by introducing a badly needed new abstraction layer.
August 14, 2014
Useful FactoryGirl methods
I did this brief post about some methods and configs in FactoryGirl that are very useful. Check it out: some groovy thing.
kibana-rack 0.1.4 released
I just released version 0.1.4 of kibana-rack! This release has a set of fixes and refinements to the Elasticsearch proxy, thanks to @dcarley. Notably, proxying to the internal Kibana index is now working.

If you use Elasticsearch in your Rack/Rails application, check out kibana-rack for an easy way to deploy Kibana for exploring your Elasticsearch indexes!
Kaminari-Cells Is Ready!
The new kaminari-cells gem allows using kaminari's pagination in cells.
Identify a problem when you have inconsistent test environment with FactoryGirl and solve the issue in this post.
August 13, 2014
Using Clearance with RailsAdmin
Where there is an admin interface, there is also authentication. Most of the documentation out there covers how to integrate RailsAdmin with Devise. But setting up RailsAdmin with Clearance is easy, too!
I'm very pleased to announce the release of a book I've been working on for some time now, "Easy Active Record for Rails Developers". The book covers everything under the sun pertaining to Active Record, including model and schema management, validations, queries, data management, extensive coverage of associations, nested forms, model testing using RSpec and FactoryGirl, and much, much more. Readers learn through walkthroughs of many examples based around a real-world project called ArcadeNomad that tracks the location of retro 1980's arcade games.
5by5 | Ruby on Rails Podcast #163: Justin Weiss -

Justin Weiss (@justinweiss) joins Sean Devine (@barelyknown) to talk about his Rails-focused blog ( and his upcoming book.
How to kick off UI development with some help from Sass, front-end frameworks and mixin libraries..
I justed blogged about a new feature on Inch CI called Suggestions.

Inch CI is a service to lint your Ruby docs. Think of it as Code Climate for your inline code documentation.

Read more ...
If you are looking at outsourcing your work to companies, in Pune India, that execute projects / develop products using Ruby and Ruby on Rails this list will be very helpful.

The list is being constantly updated.
Theoretically it is not recommended but on the other hand, sometimes you just have to do some things not as they were described in a default tutorial. Here's a description of how to run GitLab 7.1 using Puma instead of a Unicorn.
August 12, 2014
In short tutorial I will explain how to add user karma in Rails
So, you've finished a few Rails tutorials. You might have taken a class or two or watched some screencasts. You've followed along and built a copy of some tutorial apps. It's pretty clear that it's time to move to the next level in your Rails development. Somehow, though, you're stuck. There are tons of books, classes, and videos for people just starting out. But where are all the tutorials for intermediate Rails devs?
Wonder how to manage environment variables in Rails? In this article we discussed a few different solutions including Figaro, dotenv and Rails' built in secret.yml

Managing Environment Configuration Variables in Rails
In this post you will see how to generate an HTML generator using the meta-ruby gem. Our HTML generator will be similar to Markaby, a Ruby library to generate HTML in which the document structure is expressed in Ruby source code.
August 11, 2014
Hello, The plain text football fixtures for leagues, teams, match schedules, stadiums, and more that you can read with the sportdb gem into your SQL database of choice now includes the 2014/15 seasons for the English Premier League, the Deutsche Bundesliga, the French Ligue 1, and more. Or try the HTTP JSON API e.g. event/en.2014_15/teams or event/en.2014_15/round/1 and so on or better build your own HTTP JSON API using the starter kit. All data, code and samples public domain. Enjoy. Cheers.
I wrote about a simple way to benchmark slow code in your Ruby & Rails apps.
kibana-rack 0.1.3 released
Unfortunately there was a regression in 0.1.1 where path that static dashboard files were served from was incorrect. If you downloaded version 0.1.1 of kibana-rack after the previous post, please upgrade to 0.1.3 immediately.

If you use Elasticsearch in your Rack/Rails application, check out kibana-rack for an easy way to deploy Kibana for exploring your Elasticsearch indexes!
A set of Ruby gems that save us a lot of time & effort in our daily work. And hey, if they help us, there's a chance they can be useful for you as well! Taka a peek at 10 Gems To Make Ruby Dev's Life Easier.
We have released an update (1.7.3) to our command line interface. This release is to address some API changes we have made with db backups. You will need to update to this version if you want to work with your db backups via the command line. Learn more
I just released a critical bugfix for a couple of issues in the initial release of kibana-rack. If you downloaded the initial release of kibana-rack over the weekend, please upgrade to v0.1.1 immediately.

If you use Elasticsearch in your Rack/Rails application, check out kibana-rack for an easy way to deploy Kibana for exploring your Elasticsearch indexes!
On August 6th there were a number of security advisories for OpenSSL. We have deployed updates on all affected instances, and all future deployments will automatically include the updates. Learn more
August 10, 2014
[BUGFIX] Inch 0.4.8
I had to release an important bugfix to Inch related to the generation of the "Inch Rake task". If you use Inch in your Rake tasks, please update to the new version 0.4.8!
Read about a new RubyGems plugin for tracking upstream changes and check the project on GitHub.The project was originally develop for the needs of Ruby package maintainers, but can be effectively used by anyone. Need to know how the dependencies evolved through time for the rails gem? Then just type `gem compare rails '>=0.0.0' --runtime`.
finite_machine got another release with few bug fixes. Please give it a try and if you want to share your thoughts, report a bug, request a feature go to issues
There is a time, when we need to switch our apps into maintenance mode. Maybe it is because of some data processing stuff, maybe because of backups, deployment or whatever good reason you might have. To be honest it doesn’t matter why. What does matter, is how we should handle working users of our apps. In this article I describe how to setup an automatic maintenance page that will show during each Capistrano deploy. Nginx (and Puma behind) maintenance mode for Rack/Rails applications with Capistrano
kibana-rack 0.1.0 released
I just released the initial version of kibana-rack, a gem for embedding Kibana in a Rack/Rails application.
August 09, 2014
Go through this Common Mistakes in Ruby on Rails
August 08, 2014
Inch 0.4.7 released
I just released a new version of Inch, a tool to evaluate and lint your inline-docs.

Feedback and bug reports for this version were collected through Inch CI, a web-based CI version of Inch.
Just posted about a script I created to do zero downtime delayed job restarts. Please check it out and give any feedback!

Zero Downtime Delayed Jobs