Corey Haines – Fast Rails Tests

This is a must watch if you are doing Rails and doing TDD, it’s an eye opener on how you should really approach testing Rails apps the “Right” way.

May 9, 2012 · 1 min · admin

The simplest Enum you will ever find for your ActiveRecord models

I have been using a really useful snippet for a while now. While dropping it today into a project I realized just how powerful it is: it’s a drop-in and will work on any project it’s database agnostic it’s dead simple it’s not sensitive to enum changes and more and more Just as an into, an enum is a way to have string represented as integers in your database....

May 8, 2012 · 1 min · admin

10 Things You Didn’t Know Rails Could do

James Eduard Grey published a presentation of a talk he did in RailsConf. It is pure gold, so many tips and tricks, I promise you, some of these will be new even to the most experienced of Rails developers. 10 Things You Didn’t Know Rails Could do // Speaker Deck.

April 26, 2012 · 1 min · admin

With GOV.UK, British government redefines the online government platform – O’Reilly Radar

Reading this article made me realize there’s hope in making government sites better. The state of the government sites in Israel for example is shameful, all written in .Net, no standards and no cross-platform consideration. It’s a very good read. Why create an open source stack? “Why not?” asked Bracken. “It’s a government platform, and as such it belongs to us all and we want people to contribute and share in its development....

March 30, 2012 · 1 min · admin

Pull Request #5340: Added wrapper tag for simple format, added test by KensoDev · rails/rails

Following my latest post about the simple_format, I think that it’s broken to assume only “p” tags are valid wrappers. So, I opened a pull request to Rails itself. Basically, it changes simple_format so you can pass in the wrapper tag you want, I found myself wanting a “div” or a “span” too many times. Pull Request #5340: Added wrapper tag for simple format, added test by KensoDev · rails/rails....

March 13, 2012 · 1 min · admin

Setup your laptop for Ruby and Rails development

Setting up a new machine has never been an easy task, I remember back in the days where I was a windows user, setting up a new machine was a real pain in the ass. I used to write everything I had installed on a piece of paper and then go one by one and install everything, if I needed to download it could take even days to get a new machine up to speed....

November 15, 2011 · 3 min · admin

Rails uninitialized constant Resque::Server

One of the most significant changes in my migration of a rails app from Rails 2.3.10 to rails 3.0.9 was the move from delayed_jobsto resque. Resque is a Queue system that’s based on Redis, which is much faster and reduces the load on your database. Also we were experiencing some nasty deadlocks with delayed jobs that really broke our transactions and our backs. I installed the gem and installed Redis on my development machine, mounted the Sinatraapp on my rails app and navigated to the web view of resque....

August 31, 2011 · 1 min · admin

Uninitialized constant Syck::Syck (NameError)

It’s old news for you devoted reader, but as you know I love coding with Ruby on Railsand that’s what my story for today is all about. I just spent about an hour scratching my head and throwing my keyboard (don’t tell Jobs) around my home office on this issue. I am upgrading an existing project (guess which…) from rails2 and ruby1.8.7 to rails3 and ruby 1.9.2. First thing is of course installing bundler and working with the Gemfile (thank god)....

August 15, 2011 · 2 min · admin

SSL verification issue with the Foursquare2 gem [Solved]

I’ve been implementing a Foursquare API into a website using the foursqaure2gem. While working on development, everything went smooth, tests passed and it was really cool to work with. However, once I deployed staging and production I immediately encountered the well known SSL issues. 1 2 3 SSLv3 read server certificate B: certificate verify failed The solution actually wasn’t that trivial, I monkeypatched the gem so you can pass an SSL hash and refer to the ca_file....

April 27, 2011 · 2 min · admin

Solving the SSL issue with the Rapleaf API

While working with the RapleafAPI, I encountered some major issues with SSL on production and staging servers. Discarding what I did, the application just couldn’t get through to the external service using SSL and kept giving me errors regarding SSL communication. After reading the Rapleaf gem documentation I found that you should reference your certificate file, this “telling” the service where your certificate file is. I am working with Amazon EC2 for deployment of my application, both for production and for staging, I had some trouble finding the file, so I executed a *nix command and found the files in no time....

April 25, 2011 · 1 min · admin