RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  

RubyFlow is being redeveloped and redeployed this weekend, so.. you might want to pause on posting ;-)

January 26, 2015
I just launched How to write a clean code in Ruby on Rails?
My latest post in building a pocket clone from scratch
Code named Kantishna for the Denali area of Alaska, the ActiveRecord SQLServer v4.2.0.pre is ready for testing. As the name suggests, this is for SQL Server 2012 and higher.
January 23, 2015
thoughtbot created an open source GitHub repo this week called Today I Learned. It's receiving lots of community submissions for tips in all programming languages, including lots of Ruby. infrastructure engineer Adam Enger explains How to block bots with NGINX rate limiting
Video encoding processor for CarrierWave, more options and background processing here.
January 22, 2015
I just blogged about how to build better APIs using general, simple but powerful ideas from the world of monads.
Read about a new Rails feature ActiveModel::Errors#details
Please visit here .
Constructive criticisms and suggestions welcome.
Output is something like this
I released binding.repl v3.0.0 a couple of weeks ago. It can start Pry, IRB, Ripl, Ir, and rib at runtime with a single uniform interface. Example: binding.repl.irb, binding.repl.pry, etc.
January 21, 2015
Here is small PooledRedis gem to manage redis conection(s) in your app.
January 20, 2015
Encryption on Rails - a Primer
Encryption on Rails - a Primer - Learn to do multi-key encryption with rotation by engineer Joe Kurleto.
MailInterceptor gem for intercepting and forwarding emails in non production Rails environments.
Ruby Forwardable deep dive
Take a deep dive into Ruby's Forwardable library and find out how it works. I learned so much by getting familiar with this simple library so I decided to pull it apart piece by piece in my latest blog post.
I just published a post suggesting that we only use double-quoted Ruby strings. What do you think?
When you first try Ruby, monkey patching is amazing. It makes Ruby a joy to read and write. That is, until you hit weird problems that are impossible to debug. But what’s the alternative? Waiting for blank? to make it into core Ruby before you’re allowed to have nice user input handling? How can you write monkey patches that won’t make you want to fire yourself for incompetence the next time you see them?
A new version of lograge 0.3.1 was released last weekend.
It comes with some performance improvements, cleaned up code and more documentation.
Hello, I've started a new Ruby Gem of the Week series (w/ web feed) that presents a new Ruby library every week on Thursday on Planet Ruby. So far the gems presented include: Week #3 - slideshow gem - a free web alternative to PowerPoint and Keynote in Ruby; Week #2 - hoe gem - build, package and publish gems with hoe rake tasks; Week #1 - factbook gem - turn the world factbook into open structured data e.g JSON -- Happy Planet. Cheers. PS: Have your say! Guest posts more than welcome.
January 19, 2015
In this eight part series totaling more than 75 minutes you’ll learn all about Active Record Associations. I’ll introduce you to each of the natively supported association types, including belongs_to, has_one, has_many, has_and_belongs_to_many, and has_many through, guiding you through real-world examples of each. You’ll follow along in both the code editor and Rails console as I define and subsequently interact with each association type. You’ll also learn how to validate associations, and manage association dependencies. Learn more about and purchase the series for just $15 at
Symbol GC in Ruby 2.2
What is Symbol GC in Ruby 2.2 and why should you care?
IMGKit is rad. You can create image files (great for sharing on social networks) and serve them from Rails just like any other dynamic view. Find out how!
Ruby and self
Ruby newcomers usually are confused about the use of self, whether it’s a completely new concept for them or not. So I wrote this post to show briefly how it works.
I just released the Hasten gem. Here's a blog post about it.

You may find that someday you are working on a production application, and you want to do some testing on your local environment using production data. Furthermore, you may find that this application has a very large mySQL database, with tables that have many millions of rows. So, you export that database file from your production environment into a SQL file using mysqldump and copy it to your local computer. However, when you go to import that database into mySQL like so 'cat database_dump.sql | mysql -uroot' it takes many hours to import.....
January 18, 2015
trip is a concurrent tracer for the ruby programming language. It yields control between two threads, most likely the main thread and a thread that trip creates. It is implemented in pure ruby(no C) and with the help of "Thread#set_trace_func". It can be useful when building developer tools like a debugger or if you want to step through code progmatically at runtime.
Cron Jobs and Rails
We wrote up a new tutorial on how to run Cron jobs with your Rails apps. We talked about use Cron to run rake tasks, Rails runners and the Whenever gem, and some alternatives such as Sidekiq/Sidetiq and the Heroku Scheduler. 

Cron Jobs and Rails
Default thumbnails tracking for Dragonfly can be a bit slow - since it performs DB query each time you request an image. here's a solution that's using two cache layers: memcached and underneath a DB cache storage.
I just wrote a little something here with suggestions on how to improve your Gem configuration in order to avoid misconfigurations, missing values, configuration scope issues, and more generally: disappointment.
I just wrote a little something here with suggestions on how to improve your Gem configuration in order to avoid misconfigurations, missing values, configuration scope issues, and more generally: disappointment.
I just released Test Driven Development in Ruby for Beginners book on Amazon.
January 17, 2015
Recent Releases from Rubyworks
* Facets 3.0.0
* ANSI 1.5.0
* RSpec On Tap 0.3.0
I just launched a new course Test Driven Development in Ruby for beginners. This link will get you a $35 discount. Enjoy!
January 16, 2015
Why does Ruby have blocks?
Newcomers to Ruby often have difficulty with the concept of blocks. Here's how I like to explain them.
We just made first public release of Rbkit . A low pause profiler with very easy to use Desktop companion app.
Learnings Rails takes time because you’re learning to be a good software engineer, not just a Rails developer. Learning Rails Is Not About Learning Rails! is a comment to lately popular mind maps trying to explain why learning Ruby on Rails is hard.
If you have issues with your Mongoid relations and wrong indexes being picked, you may want to look here: Mongoid (MongoDB) has_many/belongs_to relation and wrong index being picked.
January 15, 2015
I just released the second release candidate for middleman-presentation 0.16.0. Detailed information about changes made can be found in the
I just recorded a screencast where we take a look at refactoring controller methods into a much more organized format.
I've created a small tool to configure virtual machines for Ruby on Rails development - It uses VirtualBox, vagrant and ansible under the hood.
January 14, 2015
Debugging Super Methods with Ruby 2.2
Debug more, quicker with the new debugging super_method introduced in Ruby 2.2.
I just released a new version of search_cop. v1.0.5 is a bug fix release that fixes issues regarding quotation.

SearchCop provides search engine like fulltext query support for ActiveRecord.
January 13, 2015
Tropical Ruby 2015, the beach Ruby conference announced its full lineup, including talks, workshops and activities.
You found the perfect solution to your crazy testing problem. All you have to do is override DEFAULT_HOST, and you'll be in business. Except that you have to turn off warnings. And you have to figure out that one test where you don't want to override the host. And then... Except...

And a few days later, when you get stuck for the twenty-seventh time and your app has become one giant ball of hacks, you'll sit back and wonder: Why am I doing all this? Isn't the solution worse than the problem?
A menu system using Pundit
A blog post about we wrote a menu system that incorporates the Pundit gem for permissions, based on Rails' routes parsing.
Rails has this great feature called counter_cache. When you have a has_many/belongs_to relationship between two models, it basically lets you say that you want to save the number of associated objects on the has_many side. So if you have Post has many Comments, you can do post#size and no SQL query is executed, Rails simply just looks at the comments_count field of the post.

Sometimes that field gets out of sync though, and if that happens, here is how to recalculate it!
gaugauin gem, created by Ania Ślimak, helps you count colors of a RGB image. It allows you to count a realistic number of image colors or to create color palettes based on images. Useful in apps for e.g. printing houses, promo agencies, designers.

Check it out on our blog >>
Want to learn how to use Enumerables? Time to learn by building the Enumerable module yourself. Check how you could build the methods implemented at Enumerable yourself and use them in your code.
January 12, 2015
Extracted from an API-backed Rails app currently running in production, Spyke provides an ActiveRecord-like interface for interacting with REST services. It comes complete with features I was unable to find in other solutions, such as properly working scopes, customizable associations, ActiveRecord-style log output, fast JSON handling, etc. View Spyke on GitHub
The Ruby ecosystem has dozens of tools for evaluating the quality of your code, but there's a lot of variability in their usefulness and ease of use. Here are some that I've found to be both important and easy to integrate into my development workflow.
Hello, I've added a sources page to the Planet Ruby that lists more than 101+ ruby blogs and news sites w/ feeds. Anything missing? Let us know. Happy planet. Cheers.
A step by step guide on how to do phone verification using SMS via Twilio. Read the full article here.