RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
March 25, 2014
Hi Lexeme users,

I have updated Lexeme gem to version 0.0.5

Lexeme on Github
Lexeme on Rubygems

One tiny thing I added is the line number where token is found - useful for hinting errors to the user.

Please check it out and let me know if there is any other feature requests.
I just launched a revised beta version of Maths practice app for 6 to 10 year olds (May be even for adults !). Please check it out.
I have been putting these posts together for all programming languages, at least those who're supportive of web frameworks, first I'm on a mission to cover all of the minimal ones - then move on to bigger guns!

Here is the link.
Many times, we feel we should use gems to solve our problems. I believe gems should be a last resort in many cases since Rails already have most of the API to solve the problems you need.

Read my thoughts on the matter here
Last week, I talked about three conventions that can help you beat procrastination and get your new Rails project started. But you still have a tough choice to make. Which code do you write first? Authentication? The part that talks to Twilio? And how would you even begin to work on the forum post recommender engine? Yep, at some point you actually have to write the code, and to do that, you need a place to start.
12 Vim Tips
Compilation of 12 Vim Tips I've found interesting.
Here's a story about using some of Ruby's powerful command line options to refactor a large-ish script to (essentially) a one-liner. Read Using Ruby command line options.
Form object validations in Rails 4
We have written a blog post about how to write, and validate form objects here. Examples in the blog don't use any gems, and just use services provided by ActiveModel::Model to implement form objects.
Curious How to Build a Rails Engine?. This post will walk you through the process of creating a Rails Engine for a client-side timestamp gem. Enjoy!
I wrote first part of series of posts about how to create todo rails app
BigBroda is an ActiveRecord adapter for Google Bigquery.
It supports many of the AR awesomeness: querying, associations, migrations and yadayada
March 24, 2014 is a site which organize your orders across the net. Inside you'll find a wall with your orders and a convenient interface to view the order details on desktop, tablet & mobile (Foundation). You can send your PayPal receipts by mail and the orders in it will be automatically inserted to your account (for more details see the News section). Nice & Easy. Support for more sites is planned (e.g. Amazon) and further options that will make your life easier!
The site is built with Ruby on Rails and i would like to hear feedback from you and suggestions for improvements.
Manage Your Child Labor with Ruby!
Want to write a server with multiple concurrent child processes in Ruby, for maximum safety in failure? Here's how to do it in Ruby, how to handle restarting workers and shutting down the process, limiting resources and even when to hand off to an external process manager.
A new article is up @!

A Functional OO Deck of Cards..
Let's build a deck of cards today using a hybrid approach, that is to say, lets use good Object Oriented design but keep our objects stateless and our functions idempotent.

We are going to need to describe a deck of cards using objects, so let's look for some logical boundaries and give them names. One way we can do this by describing what we want in a paragraph and a title. Let's do that now!

Continue reading A Faux-O Deck of Cards at
Introducing Lotus::View
The missing part of all the Ruby web frameworks is the distinction between views and templates.

Keeping things separated, helps to declutter templates and models from presentation logic. Also, since views are objects they are easily testable. If you ever used Mustache, you are already aware of the advantages.

Lotus::View is based on these simple concepts.
[Continue reading]
Nothing fancy, just simple word/tag based recommendation algorithm written in Ruby.
I posted an update about the packages available for my Build a Ruby Gem eBook. The book will be available starting Thursday, March 27th at Midnight (EDT).
It's time to learn how to efficiently manage a Core Data backed UITableView by using NSFetchedResultsController. It's much simpler than you would think, and once it's done it's extremely easy to maintain. Your table views will be faster, your memory usage will go down, it's just a great time to be a table view!
March 23, 2014
wroclove.rb 2014 recap
What are the hot topics in Ruby community? Read what was discussed at wroclove.rb 2014 conference
synvert is a very interesting project we are working on now, it can parse your ruby source code, find out old deprecated ruby code and then automatically replace them with new better syntax ruby code according to predefined rules.

We already define 4 snippets (predefined rules),

1. use FactoryGirl short syntax, e.g. replace FactoryGirl.create(:post) with create(:post)
2. convert dynamic finders, e.g. replace User.find_all_by_login_and_active('name', true) with User.where(login: 'name', active: true)
3. use strong_parameters, remove attr_accessible in models and add def xxx_params; end in controllers
4. automatically upgrade rails 3.2 to rails 4.0

synvert is still in alpha stage, any suggestions or pull requests are welcome.
JODY is a technique which uses JSON and conventions to simplify development of sites with dynamic content.
March 22, 2014
Using Extract Method Object to refactor large methods

I have previously been over the extraction pattern, Extract Method. Today we will explore it's big brother, Extract Method Object.

The Extract Method Object pattern is used to take a method or groups of methods from coupled, untestable code into code that adheres to the Single Responsibility Principle, or an object/ method/construct should have 1 and only 1 reason to change.

Read now!
Hello, I've updated the worlddb gem that includes models for places, continent, countries, regions, cities and more. The worlddb gem also includes free open public domain plain text fixtures for all countries and territories in the world plus some regions/states/provinces and some cities/towns/hamlets. Use it like c = City.find_by(key: 'wien'); # => 'Austria' and so on. Cheers.
March 21, 2014
Step by step guide for deploying Rails Application to OpenShift PaaS
At OnLive, we open-sourced an experimental Ruby HTTP framework with some ideas I think everyone should steal.

Basically: dual-mode SOA where you can debug as a single process and break into multiple processes for testing and deployment.

The framework works fine, even though it never made it into the final product we hoped.
Join us Oct 11 - 12 for Boston's 2nd annual Ruby conference. Please note this is a evening conference. We have pre-launch tickets available. Limited quantity of 50.
We recently had to create a spotlight search like feature using Elasticsearch in a rails app. You can read about it on our latest post.
C macros are used fairly often in Objective-C projects, but RubyMotion doesn't provide a solution for these. Instead we can preprocess our application's files ourselves before they're compiled, using ruby!
A new blog post in the code climate blog named Kickstart your next project with a Walking Skeleton.
I just wrote a post about how to Create Install and Deploy a Ruby on Rails App in Five Minutes. Using open source force you can easily create your own websites.
Validate HTML locally in your integration tests. No more dependencies on a third party service. Run faster. Improve your search ranking (google CARES about valid html!) Know when you make an HTML mistake. html_validation wraps the HTML Tidy executable by the W3C, and supports HTML 5.

New in version 1.1, you can specify validation errors to globally ignore, attributes to ignore, and tags to ignore. Because sometimes you need to break the rules...
March 20, 2014
My follow-up post on Ruby blocks is up at the O'Reilly Programming blog: Why Ruby Blocks Exist: Putting Return Values to Work. Learn how map and find_all work behind the scenes!
Effective business communication heightens productivity. An important step in increasing communication and decreasing inefficiencies is to eliminate assumptions.

By iterating with the business using Behavior Driven Development tools like Cucumber, we’re able to account for discrepancies in interpretations and speed up the development process over the long term while allowing changing requirements from the business.

How to Improve Business Communication with Behavior Driven Development
March 19, 2014
Steel City Ruby CFP Opens
The CFP for Steel City Ruby 2014 is now open at and will be open until April 19th, 2014.
The fourth iteration of eurucamp will take place on 1 - 3 August 2014. Our Call for Proposals is open until the 1 May and we're launching a mentorship programme to help encourage new speakers to participate.
André Arko writes about the new Rubygems index format, which has been a long time coming.
Do you run an Open Source project? We would love to see you involved in Rails Girls Summer of Code! In order to propose a project for this year's Rails Girls Summer of Code please open an issue on this repository!
I just launched IsolatedService. IsolatedService lets you fake service calls. If you have a service that you can't reach or if you work in a SOA environment you may find this useful!
I've just released order_query, a gem that finds next / previous record(s) in one query, for ActiveRecord.

We use it for linking to the next search result from the show page, in a typical search -> show result scenario.
I wrote a new post on Ruby Gem Configuration Patterns. Hope you enjoy!
March 18, 2014
TheRole - Authorization Gem for Ruby on Rails with administrative interface.
version 2.4 released
In this release GUI (based on bootstrap3) moved to external gem.
A true story of Going From Java to Ruby on Rails.
You’ve just typed rails new on your next project. Now what? Where do you start? There are tons of decisions you have to make up front, and it’s easy to feel lost, and procrastinate, and get frustrated, and never finish your app.
I love being a developer but the job doesn't come without its risks.
I wrote a blog post on managing externals in your Ruby tests. It includes tips for managing time conditions, avoiding HTTP requests and testing an OAuth flow.
Prawn PDF Toolkit goes 1.0.
After six years of hard work, we've finally shipped Prawn 1.0.

Please use it, contribute to it, complain about it, and make it better.
March 17, 2014
There is a lot of apps out there that have both an iOS and OS X application, and a good amount of their code could be shared. Learn how to do exactly that with RubyMotion by reading my new blog post, Truly "Universal" RubyMotion Apps.
Inch Pages: The first three weeks
Three weeks have gone by since Inch Pages, kind of a Code Climate for your inline docs, has launched.

I just wrote a blog post about the state of affairs.
Why do you like Ruby?
While we work on client projects, personal projects and our site using Ruby it's often good to stop and remember why we love ruby so much. Here's why we do.
A five minute demo of lesser known Ruby features titled Nobody Knows Ruby, presented at Wroc_love.rb in Poland.