RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
August 17, 2014
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
DNS to CDN to Origin
Content Distribution Networks (CDNs) such as Amazon CloudFront and Fastly have the ability to “pull” content from their origin server during HTTP requests in order to cache them. They can also proxy POST, PUT, PATCH, DELETE, and OPTION HTTP requests, which means they can “front” our web application’s origin like this: DNS -> CDN -> Origin.
I've wrote tutorial about how to add comments in Rails using commontator gem.
I released a new version of middleman-presentation:
Version Number
To make it easier to build and maybe reuse a presentation, you can now add a version number to your presentation
Custom Slide Template
Now it is possible to define a custom slide template.
Easier creation of themes
Now there's a helper command available which makes theme-creating a lot of easier.
Footer for your presentation
Now middleman-presentation displays a footer on each slide (from the 2nd slide on) with your name, the copyright and the version number
Language detection for new presentations
Now it tries to guess what's the best language to use (based on the LANG-environment variable) when you create a new slide using the slide-command
Make debugging of slides easier
With this release you find HTML-comments with the file name in the rendered output.
Hello, Using Ruby build scripts, that is, rake tasks, I've built up a new GitHub org, that is, beer.csv - for open beer data in the CSV (comma-separated values) format, that is, plain old text. To get started I've added - for a change - beer statistics such as production, imports, exports, consumption, consumption per head, etc. for countries. Cheers. Prost. Salud. Kampai.
August 07, 2014
Check out Toptal’s new community-driven list of great Ruby on Rails interview questions. We've begun with an initial sampling of questions. Read them, comment on them, or even contribute your own.

Toptal is pleased to provide this service to the community and welcomes your feedback.
Found a simple way to make several logging facilities in Rails.
Annotating AngularJS inject dependencies got you down? Using Rails? Try disabling variable mangling during JavaScript minification to alleviate your woes.
Minitest earns a lot of praise for being simple to pick up, but did you know that you can add your own custom assertions and expectations to make your tests read the way you want them to?
August 06, 2014
Here is a new gem which will help you validate and convert your Rails controllers parameters in a clean & readable way.
We all love to enter the Rails console to try out some stuff. It's just a rails c away in development, but what if you want to view or fetch some specific data on your remote production server (and you're not on Heroku)?

Read more
We recently added OAuth to to our Rails app that uses Sorcery for authentication and wrote a tutorial for it.

Add OAuth to a Rails App Using Sorcery
Learn the three types of Caching in Ruby on Rails