Category Archives: Programming

Protecting Assets hosted on Amazon S3

One of the requirements of a website i’m building is that assets uploaded by the website’s users are protected from access outside the website whilst still being accessible from within the site. I’m using Paperclip (Rails 3.1) for uploads and … Continue reading

Posted in Gotchas, RoR | Tagged , , , , | Leave a comment

Misleading Validation Errors In Spree

Just a reminder that when shipping address fails validation due to “no shipping method” it may be caused by incorrect weight set additional calculators.

Posted in Gotchas, Ruby | Tagged , , , | Leave a comment

It’s Rubber Ducking Jim, But Not As We Know It

I read The Pragmatic Programmer: Journeyman to Master when i first started working for my previous company and one of the techniques it describes is rubber ducking. Where you vocalise a problem to someone to help you to get a … Continue reading

Posted in Programming, Random Stuff | Tagged , , | Leave a comment

Debugging Mootools 1.2.4, Rails 3 UJS Problems… Solved!

In Times Of Crisis… Spent a whole evening last night trying to get the Mootools Rails 3 UJS driver working correctly. Links created in templates were recognised as having “data-remote” attributes as rails.js applies events on domready but dynamically created … Continue reading

Posted in Gotchas, Javascript, RoR, Ruby | Tagged , , , , , | 2 Comments

Only Return Items With An Image Link From Google Base API

I was sure there must be a way to do this but for the life of me couldn’t figure it out… Until I found this thread which had exactly what I was looking for. Just add [item+flags:image] to the query! … Continue reading

Posted in Gotchas, Programming | Leave a comment

gem install nokogiri fails if libxml2 and libxslt packages aren’t installed

I’ve had to do a couple of setups over the past few weeks and every time I forget about this so here’s a reminder. The Nokogiri gem requires libxml2 and libxslt to install. Otherwise it throws this horrible make error … Continue reading

Posted in Gotchas, Ruby | Tagged , , | Leave a comment

Ronseal Ruby 1.9.2-p0/Rails 3 install instructions for Ubuntu 10.1

Just found these install instructions for Ruby 1.9.2-p0 and Rails 3 which don’t assume you already have a Ruby installation.  The instructions are actually for Ubuntu 10.4 but I’ve had no problems installing on Ubuntu 10.10. I was going to … Continue reading

Posted in Programming, Ruby, Ubuntu | Tagged , , , , | 2 Comments