My Gems of 2013
I noticed that I ‘starred’ over 320 gems on rubygems.org. So I decided to do some cleanups there and while I’m at it - share with you few real gems that I like to use. So here it is - my tiny list that I called “My Gems of 2013”, mainly because it sounds catchy; a little bit of marketing didn’t killed anybody yet, I think.
I tried to avoid some, well, really obvious choices (like rspec, mocha, sidekiq, devise, resque, carrierwave, etc. - you get the idea) so maybe you fill find that one precious, very special thing that you will love ;-). Here we go.
Yet another chruby user
REST API Client Server with Rails
Few days ago a new project was thrown in my face ;). And it was interesting I must say - extracting some heavy internals of existing application into internal API + external client (app), that could be developed further with some additional features.
Debricking Buffalo WZR-HP-G300NH (linux)
If you’re reading this you’re that means you don’t need further introduction to the problem, let go straight to solution then ;).
Migrating from resque to sidekiq
In a company I’m currently working we have been using resque to do some heavy asynchronous work. And well, that’s like obvious choice in Rails world - just go with resque, fork some processes and relax ;). But when you get to a point, when you need few hundred workers and few servers, you start to ask yourself - can’t you do it better?
You probably can. There are some pretty smart folks out there, who were so kindly to share their knowledge. And that’s how you can find sidekiq build on top of celluloid.
Sidekiq uses multi-threading, so you can leverage that even if you use MRI (that have un-famous GIL) - if you have a lot of I/O bound work you can still benefit from this great piece of software (even without need to migrate to JRuby or Rubinius).
API-like gem for fetching data from quakelive.com
Rails after_commit create mindf*ck
Rails 3 observers can be tricky. You probably already heard a thousand times how to deal with undefined id issue and how transactions are handled, so let’s take a quick example that can be google’d in just a couple of seconds.
Windows-1250 to utf-8 bash one-liner
Delayed::Job to Resque migration
When it comes to doing some asynchronous work, Ruby on Rails community have some great ready to use solutions to choose from. I think most popular is delayed_job and resque (and probably sidekiq, but a story for another blog post).