-
Recent Posts
Categories
Tags
Meta
Category Archives: Ruby
Last night’s dream
I got off the tube and all of the walkways were drifting around, because they were suspended from the ceiling by rusty chains. I was the only person who had to lie down and crawl to the exit.
Posted in Ruby
Leave a comment
respond_to ordering still causing havoc with Internet Explorer 7
At least a year ago, I ran into this guy’s problem. Today, I just ran into a similar situation with Rails 3′s class-level respond_to / instance-level respond_with pattern.
Resolving Cucumber step ambiguities
Following the latest campaign against imperative Cucumber stories in favour of declarative stories (see especially Dan North’s great article on domain languages), I’ve been trying to get more naturalistic language into my stories. However, it becomes very easy to run … Continue reading
Make Solr / sunspot_rails, Cucumber and VCR bestest buddies
After spending the morning banging my head against another Cucumber problem, I thought the best way to spend an afternoon would be to run into another hilarious jape that Rails 3 threw at me.
Always define controller action methods in Rails 3
This morning was spent puzzling over a strange hard-to-reproduce Cucumber test failure in a project I have been upgrading from Rails 2.3.x to 3.0.3. It was only occurring after certain steps had been taken in previous Scenarios, and not when … Continue reading
ActiveRecord errors full_messages i18n incompatibility
If you’re running a Rails 2 app on a system with the latest i18n gem, ActiveRecord’s object.errors.full_messages spits out the string “{{attribute}} {{message}}”. You might notice that this is the old interpolation syntax for internationalisation in Rails 2. The latest … Continue reading
Posted in Ruby
Leave a comment
Notes on a Rails 3 upgrade
Most scary output from console is warning rather than error. RSpec 2 doesn’t have have_tag method. Now using webrat’s have_selector. Plugin to help with upgrade only relevant to Rails 2 project, which seems silly. Should use ‘extend ActiveModel::Naming’ in non-ActiveRecord … Continue reading
Cheffin ain’t EZ for beginners
When I first set out to learn Chef I found that most of the blog posts, tutorials and even the Opscode Help pages themselves were a bit difficult to understand, to say the least. The ontology surrounding Chef is pretty … Continue reading
Music piracy geocaching wins prize at Music Hack Day!
I had a fun time at Music Hack Day London 2010, despite only being there physically for the Saturday. The team, made up of Yves, Chris and myself, with camerawork provided by Patrick, created an Android app to discover musical … Continue reading
CruiseControl.rb rake task for running rspec and cucumber with a single test database
I wrote this rake task for running the rspec and cucumber tests for a Rails app whilst ensuring that only one database is used. It took a bit of Googling and lots of trial and error so thought I’d share … Continue reading