RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
March 12, 2014
We are using this for our crons since the unix timeout command does not support different kill signals

gem i multi_timeout
multi-timeout -INT 5m -KILL 6m rake foo:bar

One of the Ruby engineers at Originate posted a great article on how to get really fast rails tests by not loading all of rails. He also published the rails_spec_harness gem to make it easy to set up your spec helpers the way he describes in the article.
Since it's my first Angular / Rails app there's not much here for experts, but if you are considering doing one here are some things you might be able to put off until later but still get the job done.
Stunned by Sexism
I am a ruby engineer at heart. Those who know me usually see my posts about the ruby tools I have built on here. However today I am sharing a story about sexism that I think everyone should read. Let this be a reminder that as a Ruby community we need to be open and embrace everyone, including the companies we work for.
March 11, 2014
Three simple and useful advices that I gave to a friend that is new to Rails / Heroku.
RubyConf Taiwan, Taiwan’s biggest event for programming language Ruby will be held on the last weekend of April (April 25th and 26th) at National Yang-Ming University. According to Mu-Fan Teng(@ryudoawaru), organizer of this gathering, many important speakers and distinguished guests have been invited to the conference, known as the most internationalized grand event for programming language and its pursuers. Registration of this event will begin at 12:00 on March 10th.
The press release is here
I just launched activerecord-hierarchical_query which allows to create recursive queries to traverse trees with single SQL.
Next post in our Reflecting on RubyMotion Experiences series.
After spending so much time testing Rails with factories, I took a look at fixtures again and liked what I saw.
Awesome Vim Plugins
I've written this post on Awesome Vim Plugins.
March 10, 2014
Learn Chef - it's hard but worth it
Having troubles learning Chef? I hope this will keep you motivated
Please checkout Cucumber & Page-Object with Facebook home page. UI testing using BDD.
I needed to loop over a fairly large data set and group it by year and month. In this post I walk through using two Ruby Fibers which communicate between each other in order to do in-loop grouping. The post begins with a brief introduction to Ruby Fibers.
Cells is a popular view component gem for Rails. The latest 3.10 release changes the API slightly - read the blog post for a discussion on cell caching and the changes.
You can use Rails Composer, "the Rails generator on steroids," to create any of the Rails 4.1 starter apps from the RailsApps project, including a new application that combines Devise and Pundit with Bootstrap or Foundation.
There is more to Todd Werth's RubyMotionQuery (RMQ) than you might realise, it's filled with amazing tools to help you clean up your code and possibly do things you didn't know were possible. In this episode I have 5 Advanced RMQ tips to expand your knowledge of RMQ.
March 09, 2014
How to install VPS for rails development/production with CentOS, rbenv, ruby, rails, nginx, passenger
When building APIs you should be careful with what you actually allow people to see since anything that's out there could possibly be called by someone. Read more about it here.
erlang-etf provides a pure Ruby version of term_to_binary and binary_to_term for communicating in Erlang's External Term Format. Map from Erlang >= R17 and compressed binary support has been recently added.
March 08, 2014
Unitwise is a Ruby library for unit conversion, measurement math, and really handy tool for performing scientific calculations. I have officially released it, and would appreciate any feedback before I move to v1.0.0.
A neat way to use powerful tools to develop your RubyGems and have the
library at your fingertips.
March 07, 2014
SitePoint Ruby just put the 2nd part up here. If you want to learn about this library, these posts are great.
A little writeup on what I most like in Rails 4.1: Rails 4.1 - My favourite changes
gem install java. Because why not.
RubyMotion the "Rails" Way Proposal
This is a current proposal that I’d like your feedback on for how we can clean up how we write RubyMotion applications. It’s purely conceptual at the moment, and there would have to be some framework development to make this work the way described here.

Please submit your feedback, as a joint effort we can clean up our RubyMotion applications and make it easier for Rails developers to expand their skills into RubyMotion development.

RubyMotion the "Rails" Way
March 06, 2014
Announcing Sprig, a new gem for better seed data management in your Rails apps.
Inch, the gem that powers Inch Pages (which is basically Code Climate for your docs), now supports per-project configuration via an .inch.yml file (see the README for more info).
Checkout a simple and concise 7 part RSpec series at RSpec. It covers some of the most important and commonly used RSpec features.
I just launched BigBroda: an ActiveRecord adapter with rails integration for Google Bigquery.
A lesson I learned 10 years ago that still holds true today
March 05, 2014
The shortcode gem for parsing wordpress style shortcodes in ruby content management systems now has presenters for more powerful control over what is rendered by the templates. Check it out.
I very much dislike the all too common pattern
module Foo
def self.included(by)
by.extend ClassMethods

That's why I created the inherit gem. It's minimal (15 LoC relevant code).
Please check it out! Feedback is welcome!
I posted an update on Build a Ruby Gem Book Tech. Review. Hope you enjoy!
We recently setup SSL on which is a Rails 3 application running on Heroku. Here is a quick summary of the entire process and hope it saves you some time when you are looking to enable SSL for your Rails application on Heroku.
RubyMotion - Under the hood
A recap of how you might see what’s going on under the hood in RubyMotion
March 04, 2014
AWS provides great tools to handle keys, authentication and security. Here’s a simple setup how to quickly make your AWS Infrastructure more secure with the Identity and Access Management (IAM).

Securing your AWS Infrastructure with IAM
I wrote about using conversion methods in Rails to make it easier to grab instances of your models. Check it out and let me know what you think!
Pakyow 0.8 Release
I'm happy to announce that Pakyow 0.8 has officially been released. This is a major release and includes a better router, a more intuitive view syntax, and an improved view transformation API. Read all about it →

Happy Tuesday!
Recently Which? launched its first piece of open source software, a Ruby Gem to easily interact with REST APIs. There's pretty full documentation on its GitHub page, but I wanted to write a bit more of a real world introduction to using ActiveRestClient to access an API.
Hi everyone!

I wanted to let you know that we just opened a limited number of early bird tickets that will be available until April 1st (or until they sell out). Please visit for information about the conference and to purchase tickets.

We are also still accepting proposals until March 17th. Visit our CFP website for details.

See you in August!
March 03, 2014
MultiMime - A generic swappable back-end for MIME type detection.
Have you hit issues reliably tearing down Capybara tests of pages that make AJAX requests? We wrote a post on how we used Rack middleware to help solve this problem.
Using Database Templates in Rails
A quick post on how to make use of database templates in your Rails app.
The elasticsearch-model and elasticsearch-rails gems for ActiveModel/Record and Rails integration with Elasticsearch have been released. Read more at
I just posted a blog on refactoring... Finding Opportunities
Hello, For your convenience I've pre-built w/ the (sportdb, beerdb) Ruby gems some SQLite databases using the open public domain data sets. You'll find the releases on GitHub. world.db (~ 0.5 Megs), football.db (~ 1.3 Megs), beer.db (~ 1 Meg). Cheers.
PS: A new database is in the works. Welcome the wine.db. Prost.
Representable helps you rendering and parsing API documents. Mapping deeply nested documents to flat objects has been a bit of a pain. A new DSL method simplifies that in an enjoyable way.
March 02, 2014
Pronto reeks! No, wait, that's not right... Actually, Pronto performs quick automated code reviews with the help of various analysis tools (RuboCop, Brakeman, Flay, etc.) by checking only the introduced changes. And now it detects various code smells with the help of Reek. Check it out: Pronto and pronto-reek.
I described two great gems: rails-api and active_model_serializers which can be useful for building JSON API. JSON API with rails-api and active_model_serializers
The great folks at Thoughtbot just announced the release of fomulaic, a smart and DRY way to fill in forms with Capybara.

For the ones who prefer writing Capybara feature specs using SitePrism page objects, I've just released tedium, which aims to solve the same problems, in a more OO way.