Archive of Ruby

Rails 3.2 Released – The upgrade story

Posted by Kevin McKelvin on January 23, 2012 in Ruby

Rails 3.2 was released on Friday 20 January.  So as any good developer would, I started playing around with it on an app I'm building.It was a breeze getting the bundle updated, just add these lines to the Gemfile and run bundle updateOnce the updated gems had installed, firing up the rails server spat a few errors out. It turns out ActiveAdmin v0.3.4 doesn't work with Rails 3.2. Within a few hours of the Rails release there was already a fix for this which has been pulled into the activeadmin Github repo.Bundling against the edge release is risky, but it works and all m

Continue ReadingLeave a Comment

FakeWeb

Posted by Kevin McKelvin on September 20, 2011 in Ruby, Testing

I was testing a client I wrote to a server API recently.  Being relatively new to testing with RSpec and Ruby, I initially took the naive approach of building a node.js application to behave as a dummy test server.Originally when I wrote the code I knew there had to be a better way, but I only found that better way today.I was revisiting some of that code and discovered FakeWeb.  It's a Ruby framework that makes it simple to test code that involves HTTP requests.  It intercepts HTTP calls made through Net::HTTP and makes it dead simple to create predictable responses for

Continue ReadingLeave a Comment

Slim Templates

Posted by Kevin McKelvin on September 18, 2011 in Open Source, Ruby

The Slim template engine seems to have gained a lot of popularity in the Rails community recently. Their site describes it as 'A lightweight templating engine.' For a long time I've loved Haml, taking the approach that I'd rather describe my intent than hard code HTML tags all over the place.However, in hindsight having used Slim for a while it appears Haml might have stepped a bit too far away from HTML, including some cryptic syntax like '%' signs to declare tags.  Slim takes a step back towards HTML.  It still uses the significant whitespace element of Haml and removes the annoying

Continue ReadingLeave a Comment

Rails 3 – It’s out!

Posted by Kevin McKelvin on August 31, 2010 in Ruby

Rails 3's been a work-in-progress for around about two years now - and as of last night it's ready!For a descriptive list of changes, check out David's blog post here: http://weblog.rubyonrails.org/2010/8/29/rails-3-0-it-s-doneThe Rails tutorial has also been updated (for the most part) - and is available at http://railstutorial.org/chapters/beginningTo install, just use the gem package manager to install the latest rails gem: gem install rails --version 3.0.0Enjoy! :)

Continue ReadingLeave a Comment