RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
March 17, 2014
compiler for Ruby on the JVM: free download at
March 16, 2014
Ruby hash selector help clean up your code Ruby Hash Selector Pattern Video / Article.
Hello, I've collected a couple of link_to helpers in the new linkto gem. Helpers include: google_search, google_search_images, bing_search, flickr_tags, flickr_search, wikipedia_search, and so on. See the linkto gem in action at the beer.db.admin site, for example, see the Ottakringer brewery page. Cheers.
I just launched gem rails-cache_control which can significantly speed up your page. This gem will automatically add HTTP Cache-control header when caches_action expires_in specified. You do not need write a single line but just included it in Gemfile.
I've seen a lot of people doing it and I used to do it too, use params.merge(…) in link_to or redirect_to calls. You do this because you want to change one ore more parameters (like the locale, current page or search query) but leave the rest as it is. But heads up, there is an issue with this solution!
March 15, 2014
Ping pong over code with DHH & say goodbye to vague architectural debates.
March 14, 2014
Polymorphism is one of the fundamental features of object oriented programming, but what exactly does it mean? At its core, in Ruby, it means being able to send the same message to different objects and get different results. Let's look at a few different ways to achieve this in Back to Basics: Polymorphism and Ruby.
Rubykiq - Sidekiq agnostic enqueuing using Redis.
I'm building a house and I write software for a living. So when someone showed me the article "Why We Should Build Software Like We Build Houses " I had to disagree...[continue reading]
I've been a busy bee
As well as Sinatra Cookbook, which I am still writing, I'm also building a platform for Freelancers and small agencies to better manage clients, Husk CRM.

To help potential clients I've built a project planner form, as I've got availability for more projects going into Q2 2014.

Then this morning, I blogged about SaaS and PaaS.

Like I said, busy busy bee.
I just launched arcserver.rb which allows to interact with ESRI ArcGIS Server Restful API.
7 daily use cases of Ruby Hash
In that blog post, I share 7 use cases of Ruby Hash I met often. I hope it will be useful to you.

How to convert a JSON into a Hash?
How to convert a Hash into a JSON?
How to set default value for a nested Hash?
How to merge two nested Hashes?
How to filter out some keys of a Hash?
How to “sort” a Hash by value?
How to find the differences between two Hashes?
I wrote a new post titled Why I Wrote the Sucker Punch Gem. Hope you enjoy!
Hello, Last nights slides from the vienna.rb talk titled "Open Football Data - Get Ready for the World Cup in Brazil 2014 w/ Ruby". Use left/right cursor keys (or space bar) to browse the slides. Or check the all-in-one-page markdown source. Cheers.
March 13, 2014
RuboCop 0.19 has been released! This is the biggest RuboCop release we've done in a while. The highlights include about a dozen new cops, more cop configuration options, improved auto-correct and so many bugfixes.

Here is the list of all the gory details. Enjoy!
This blog post describes a method that combines the advantages of automatic image fetching from existing online locations with the advantages of managing new images directly in the cloud using Cloudinary. This method allows lazy migration to the cloud as well as other powerful origin pulling options. Sample code included for Ruby on Rails.
Much is said about code reuse, when to reuse and how to reuse, but there's a strong movement about not depending on a gem if it's small or if you can write one that does the same yourself. Is it really an improvement to write one yourself?
New blog post "Deploying Padrino Applications On Heroku"

I was always asking myself how I can use cloud services like heroku to deploy Padrino applications without having an own server.

In this post I’m going to show you how you can a simple “Hello Padrino” app on heroku.ones without and ones with database interactions.
I wrote a blog post about the GC in Ruby 2.1, in which I explain how the new GC works, how to read the output of `GC.stat`, what all those env variables for GC tuning are and how to use them.
Memory used above quota will swap out to disk, which substantially degrades dyno performance.

If the memory size of your dyno keeps growing until it reaches five times its quota (for a 1X dyno, 512MB x 5 = 2.5GB), the dyno manager will restart your dyno with an R15 error.

You don't want "SUBSTANTIALLY DEGRADED PERFORMANCE" do you? Of course not.

Whacamole will help you monitor and restart your dynos yourself.
I've made a new gem called Mock5 that allows to easily create remote API mocks using Sinatra and plug/unplug them at will. Using it, you can test all kind of situations, like API being down or taking too long to respond, responding successfully or with authentication error.
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.