Header_image
Jeremy Walker

Software Developer & Social Entrepreneur

Recent Blog Posts

Using Jasmine in a Rails Engine

I burnt an hour today trying to use Jasmine in a Rails engine, and found a lot of other people having the same issue, so thought I'd blog to save someone else the same issue. The Problem To tes...
Read More

Changing YAML parser to Syck in Ruby on Rails

Meducation use Delayed Job extensively. It's one of the core pieces of our infrastructure. Sometimes, however, it crashes with an error like: (<unknown>) couldn't parse YAML at line 17 co...
Read More

Why Doctors Should Learn to Code

Last weekend I helped organise The Digital Doctor Conference in London. This was an opportunity for doctors to come and learn more about technology and learn some of the basics of coding and web ap...
Read More

Emerge Venture Lab

I'm on the way back from an incredibly exciting three days in London at the Emerge Venture Lab bootcamp and I just have a real urge to go and tell everyone about how great it's been. If you're try...
Read More

Open Space Conferences

Last week I went to Bootstrapd, an open-space conference for people who are (or are interested in) bootstrapping their own businesses. I thought it was absolutely excellent. It was a brilliant oppo...
Read More

Rails' update_attribute is deprecated from 3.2.7

The difference between update_attribute and update_attributes has confused new Rails developers for a long time. The key difference was that update_attribute did not run validations, where as updat...
Read More

Accessing the National Rail SOAP API

Yesterday a friend asked with some help in accessing the National Rail API - an almost totally undocumented SOAP API, with useless error messages and support staff utterly lacking in knowledge - yo...
Read More

Thank you, Curt Micol

One of Heroku's shared databases went down this afternoon. It took my site, and the sites of a few others with it. The automated Heroku alerts failed and we were basically left stranded. Heroku ...
Read More

The old APIs for excerpt, word_wrap and highlight are deprecated

Seeing any of these messages in your Ruby on Rails 3.2 application? Calling excerpt with radius and omission as arguments is deprecated. Calling word_wrap with line_width as an argument is depr...
Read More

Are the FIA accusing Mclaren and Lewis Hamilton of 'doping'?

In most sports, athletes can be tested for drugs at any time, with no warning. Their substances in their bodies can be scrutinised at any time and must adhere to certain standards. The cost for mis...
Read More

Fewer than 2% of Reddit users visiting my blog use Internet Explorer

I was checking Analytics yesterday and noticed that in the last few days I've had quite a lot of traffic from Reddit. I dug a little deeper and turned up these browser stats: .reddit_table { ...
Read More

Markup your blog using schema.org

Want your blog posts to look a little bit special in Google search results? Maybe something like this? Hello, schema.org! Google has supported rich snippets for a while now and have recently ...
Read More

Paperclip error: AWS::S3::Errors::TemporaryRedirect (Please re-send this request to the specified temporary endpoint)

I was just setting up Paperclip to work on S3 when I got this error message: AWS::S3::Errors::TemporaryRedirect (Please re-send this request to the specified temporary endpoint. Continue to use th...
Read More

Backbone.js, CoffeeScript, Jasmine, HAML and Rails working together

This week I started a new project that requires a reasonably in depth Javascript application. I used CoffeeScript for to make Javascript fun and Backbone to give it structure. I wrote templates in ...
Read More

Bug in Rails 3.2 ActiveRecord Store - TypeError: can't convert Symbol into Integer

Update: I've now fixed this and it's been merged into Rails core, so use the master branch is you're having this issue. If you have a non-nullable database column that you are using for the db back...
Read More

A scope for returning no records in ActiveRecord

Update: A version by xuanxu has now been accepted into Rails core. I've added a scope for .none which returns no records and skips the database. Check out my pull request on rails master - any thou...
Read More

Allow escape_attrs on a per tag basis in HAML

I've sent a pull request that allows escape_attrs to be overridden on a per tag basis. This is especially useful for me in using Backbone templates in a certain section of my app, that requires esc...
Read More

Form select tag does not accept ranges in Rails 3.2

Until Rails 3.2 you could pass a range (1..5) as the choices parameter to form.select. This is now broken. However, it still works with select_tag. The error message is "ActionView::Template::Error...
Read More

HAML is broken with Partial Layouts

This is now fixed. See github for details. For a couple of weeks partial layouts have been broken in HAML. I opened an issue at Github. The problem manifests itself by outputting the resulting HTML...
Read More

iPhone error: 'the user name or password for "imap.gmail.com" is incorrect'

While trying to set up a new iPhone today I repeatidly came across the message 'the user name or password for "imap.gmail.com" is incorrect' Took a bit of work to figure out what was going on but i...
Read More

Bug in setting table_name when using multiple namespaces

I've just wasted an hour on an annoying bug that rears its head only in the development environment. There is a bug in the setting of table_name when using multiple namespaces. This bug manifests o...
Read More

Why Ed Miliband, not Ken Clarke, should be apologising tonight

I want to precede this by stating that I'm not very politically biased: I've voted Labour more times than I've voted Conservative and that I have no real opinion on Ed Miliband or Ken Clarke. Today...
Read More

belongs_to_enum is released

I've just released a new gem: belongs_to_enum This adds functionality that I've used in pretty much every Rails app for the last 6 years. Often, you want to state that model should have (or be) a c...
Read More

Fixed Foreigner Gem to work with reversing migrations in Rails 3.1

The excellent foreigner gem doesn't quite work properly with the new reverse migrations of Rails 3.1. If you specify a column in the add_foreign_key call, the reverse remove_foreign_key_fails. i.e....
Read More

RubyGems 1.8.2 broke my Rake

This is probably some weird thing on my system, but after updating RubyGems, I started getting errors like this when running Rake tasks WARNING: Possible conflict with Rake extension: String#ext a...
Read More

Highly Targeted Advertising on ruby-forum.com

So, I'm minding my own business reminding myself of the Ruby Hash#inject syntax when I noticed the following ridiculously targeted advertising (we just bought a Mazda RX-8): I'm presuming they a...
Read More

Creating an EC2 webserver using Amazon's basic AMI.

Today I setup a new x64 server on EC2 using Amazon's homemade AMI. This is the bash script I wrote to replicate what I did. It should set you up with a working Apache/Passenger/mysql install, along...
Read More

Testing views with Rails 3, Rspec 2 and Webrat

I just lost an hour of my life on this issue, so hopefully I'll save someone else the waste! My code: require 'spec_helper' describe ExamsController do it "should present the user with the new e...
Read More

Spontaneous Human Kindness.

Graham just bought me a muffin. Last week he bought me chocolate cake. I know Graham because we've both drank coffee in the same Starbucks on and off for 6 years. He's over twice my age and on pa...
Read More