RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
July 24, 2014
This article details how you can easily and automatically scale your website images to the resolution most appropriate to your viewers mobile devices or screen pixel density. Code samples included for Ruby on Rails and jQuery.
To widen the scale of your business and get the advanced Ruby on Rails web development solutions, CSSChopper is the best company. Our emerging RoR development solutions aid you to achieve your diverse challenging business goals successfully. For more details, visit:
I put together a list of interesting applications built with Ruby on Rails.
A helpful post on Multi-tenancy in Rails by Allerin

Please provide your feedback if you find it helpful.
New blog post: Code Coverage Tools For Padrino.
July 23, 2014
We're thrilled to announce that we've partnered with Heroku for the 2014 Rails Rumble! Read all about this and our other announcements on our blog.
I just posted a technique for handling failure when doing things like importing third-party data or generating reports.
July 22, 2014
The Rails ecosystem moves fast, way too fast for print. If you're like me, you want to learn the most recent version of your frameworks and gems. But the best resources are often a few versions behind. Once you build experience with an older version of a gem, how do you get caught up?
A quick hint for all those that think that it comes by default with Errbit/Airbrake. Tracking Sidekiq workers exceptions with Errbit/Airbrake
When one Ruby method has to know the correct order of another method’s positional arguments, we end up with connascence of position. Ruby 2 Keyword Arguments help us reduce connascence, but there are some edge cases to be aware of.
I just launched Gorsse an experimental tool that allows you to use Server Sent Events in your Ruby web applications without any changes in your usual webserver. The tool relies on Go to handle many concurrent and persistent connections and communication is achieved through ZeroMQ.
July 21, 2014
Post looking into Ara Howard's excellent gem Main. Check it out here
I just released a new screencast on how to set up Button Loading Animations with jQuery UJS. Rails makes it super easy to add a spinner to your forms by just adding the disable_with data attribute. Hope you enjoy it!
Know Ruby: clone and dup
A deep dive into the clone and dup methods in Ruby.
If you like to read about why in our company we belive that pundit is a way better solution for compliacted authorization features than cancan (or cancancan for rails > 4.0) i have a first part of my blogpost for you : some groovy thing
If you like to read about why in our company we belive that pundit is a way better solution for compliacted authorization features than cancan (or cancancan for rails > 4.0) i have a first part of my blogpost for you : some groovy thing
July 20, 2014
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 also lints your HAML with the help of HAML-Lint. Check it out: Pronto and pronto-haml.
3 Ways to Create Classes in Ruby
Out of the box, there are 3 ways to create classes in Ruby. Find out how to use all 3 options, and learn when to use one option over another.
July 19, 2014
Just released a new gem cucumber_characteristics to fully profile your cucumber test runs with the goal of understanding exactly where your test time is going. This is not a formatter and should drop into your existing setup transparently.

For each step execution the following is reported
- Location of definition & regex
- Step usage location and number of times executed (background/outline etc)
- Counts for success/failure/pending/etc
- Total time taken in test run along with average, fastest, slowest times per step
For each feature the following is reported
- Location and time taken to run feature
- Result and number of steps run
- Breakdown of feature by individual example run if a Scenario Outline.
There is also added support to list out all unused steps in a cucumber test run to aid step curation. Be aware if you are only running a specific test set, for example via a TAG as you will get a larger number of unused steps than are ‘true’ unused steps.
July 18, 2014
MemFs is an in-memory filesystem for Ruby that can be used for your tests. This release brings some useful methods to Dir like the most wanted Dir.glob. Get it while it's hot !
You will see the structure of s-expressions for language features supported by Ruby interpreters and the InfraRuby compiler.
July 17, 2014
I wrote a blog post about reusing the same test code on different levels (app logic, Web UI, API)
We've had a whole journey on how to do UI for Rails projects in Arkency. Starting from Rails views, then gradually switching to more JS (with JQuery), had a short adventure with Angular and now settled with React.

This post explains the basics of what are the good things about React
A pretty decent (I hope!) list of free online Ruby tutorials for beginners.
It's happening, we will soon have a new Ruby/Rails weekly screencast! I'm going to be launching in the next 1-3 months depending on how things go, but you can read the full story here:
You can get a 1.5 GB combined Rails app server in the US region for absolutely free. How does the free tier work? 1. Sign-up to Ninefold 2. Deploy a Rails app 3. Enter your billing details within 30 days 4. We’ll waive the first $50 of your monthly invoice - forever. Visit for more information.
July 16, 2014
High-Low Testing
I've just published High-Low Testing, a detailed look at my Rails testing philosophy. I address working at the poles of test abstractions in a Rails application in order to more easily manage dependencies. Doing so provides increased test speed and better OOP feedback systems, with minimal costs.
When I needed a blog system for my company blog, I had a hard time deciding if I should use Jekyll, another Rails blog engine or just build a simple blog functionality on my own. I implemented my own, see why and how I did it.

Continue Reading
Rob just wrote a very useful piece, specially if you're looking for an intro on PostGIS and geolocation.Read it on the CookiesHQ blog and let us know what you think.
I just launched PhantRb Ruby client for Sparkfun's Phant
Now, when you build a Rails starter application with Rails Composer, you get the option of page-view tracking with either Google Analytics or (see a blog post for details). My article on Analytics for Rails explains everything Rails Composer adds, so there is no mystery code. Thanks to RailsApps subscribers for their project support.
July 15, 2014
Lately I’ve been supporting several legacy projects.

As many of you may know, working on legacy projects sucks most of the time, usually because most of the code is ugly and difficult to understand or read.

I decided to make a list of common bad practices, or what I consider bad practices, and how to improve the code or avoid this bad practices.

Continue Reading
API docs will tell you how to use an API. But when things go wrong, you can be left on your own. Error messages are often incomplete, misleading, or unhelpful. And what are you supposed to do with NoMethodError: undefined method '[]' for nil:NilClass, anyway? When you learn an API, framework, or library, you can't just learn how to use it when things go well. You also need to figure out what to do when it hands an error back.
Ruby on Rails is so popular, that there are merely thousands of good sources of how to learn it. You can choose if you prefer online courses, video courses, live courses, tutorials, blog posts, books, screencats, podcasts or another way. You can learn Ruby and then Rails, you can learn both together, you can even learn only Rails without knowing much about the underlying language. So why write another article about it? I am offering you a very full list of resources, which will help you to find the right way of learning that fits your needs. Continue reading →

Rails 4 and PostgreSQL Arrays
Bernardo Chaves from Plataformatec talks about how Rails treats PostgreSQL's array type, and how to use PL/pgSQL custom functions to do unique validations in PostgreSQL arrays.

Read the full blog post in the link below:

Rails 4 and PostgreSQL Arrays

JAGC is a code golf service for writing shortest possible (by number of symbols) solutions to algorithmic problems. The problems are created by the users. When adding a problem you have to specify a set of tests the server will automatically launch when a new solution is added.

All unique users that have provided the ten best solutions get points. Points are summed over all the tasks and displayed in the rating. The website rating shows a user's activity rather than prowess (that can only be rightly assessed in a specific task).


* Decision minimization sometimes helps to find out some language peculiarities you won't encounter in commercial programming;
* Just for the fun of it. Try it, you'll love it :)

Differences from other services

* One of JAGC's features is that you can use standard language libraries from the distributive package to solve the problems;
* Another feature is public solutions. In JAGC you can view any solutions and optimize them. Sometimes you can see interesting phrases in little-known languages;
I just launched bhf. A simple to use Rails-Engine-Gem that offers an admin interface for trusted user.
Easy integratable, highly configurable and agnostic. Works with ActiveRecord and Mongoid. It's an interesting alternative for ActiveAdmin with a slick user interface.
Starting from this week, Gemnasium can update the dependencies of your project automatically. It is now easier than ever to keep your Ruby project in shape by getting rid of the outdated dependencies.
Read more
Code style matters
Are you using some guidelines in your project? If not, read how important is code syle.
The first ever Ruby on Rails Conference in Asia - RailsPacific. ( one day conference, one day workshop )

September 26,27 2014, Taipei, Taiwan. ( 1 week after RubyKaigi )
In this episode we talk about arguments, methods and method arguments
July 14, 2014
I've created ruby tribe on Snapzu. You can post here some blog articles, projects, tools related to Ruby. Snapzu is site similar to Reddit, where users can send stories and votes on them.
July 13, 2014
In August will be launching with the aim of speeding up Rails app creation.

Drystorm will allow you to create a great looking, fully tested app with basic features in just a matter of minutes.
July 12, 2014
Hello, I've put together a factbook gem that lets you read in World Factbook country profile pages (in HTML) and returns a structured Ruby hash that you can save, for example, as a pretty printed JSON file e.g. For Brazil use: 'br' ).to_json Find ready-to-use country profile in JSON in the openmundi/factbook.json repo. Thanks to the CIA for the great service (and public domain data - no rights reserved, no copyright). Cheers.
July 11, 2014
The integration of Sunspot and typeahead.js comes in Part 2
If you know much about computer science, you know that the best we've been able to do is pseudorandom number generation... until now! Check out the new fair_dice_roll gem for when true randomness matters.
cucumber_rake_runner is a simple gem allowing you to run rake tasks inline to the current cucumber process for testing behavior and output.
For Jruby users this also eliminates the need to spin up a new JVM per rake task significantly reducing test run time.
The gem captures both stdout, stderr along with the time taken to execute a rake task so that assertions can be made easily against them in your cucumber test suite.
This week I have mostly been thinking about Go. I won’t bore you with the details. Unless you ask me. Continue your dosage of the vibe
Gitlab Backup Made Easy
Gitlab is a self hosted open source repository management tool built on Ruby on Rails. It offers a variety of features like code reviews, merge requests and activity hooks. It's the perfect tool for companies that do not want to rely on third parties to manage their code. But, with self hosting comes the added risk of server failure and data loss.

Here is a way to automate the entire backup process of Gitlab with daily, weekly and monthly snapshots and a single command restore process.

GitLab Backup Made Easy
July 10, 2014
In little example I want to show you how to convert part of Sinatra source code to pdf using Linux operating system.