Migrating to Spree, part 0: Introduction

Migrating to Spree, part 0: Introduction

24 Apr 2011 – Warsaw


When I’ve decided, back in 2007, to learn Rails seriously, I was looking for some “real” project to code while learning Rails. Just like DHH, I believe that trying some technology only makes sense if you do a real project with it.

And so a real project happened, when Krzysztof approached me with an actual plan to implement our common idea and start an e-commerce focused on selling bits from Games Workshop plastic sets. Long story short, one “Agile Web Development With Rails” (first edition — I do not recommend this book to anyone) and a few weeks laters, Bitspudlo.com was born.

There’re a lot of SVN (remember, it was the first half of 2007!) and Git commits documenting the development of this store engine. But I’ve refused to go with a ready-to-go e-commerce solution. First, I wanted to learn Rails on a real project. Second, back then all open-source e-commerce engines were written in PHP. In a very bad PHP (and some of them remain such today).

Hard Decisions

Flash forward four years and it’s april 2011. Bitspudlo, started on Rails 1.2.6, updated regularly and now powered by Rails 2.3.8, is the only application I’ve been working with during the last 7 months that’s still on Rails 2.×. Moving it to 3.0 would require quite a bit of tiresome work (especially with some of the gems and plugins used) and there are still some features in my backlog that either Krzysztof, I, or both of us would like to have implemented (especially now that our store has grown to a truly international one). In the meantime I’ve set up a few e-stores based on an awesome Rails-based e-commerce engine called Spree, most notably Topastic and Pulp City Store.

The decision has been made to migrate to Spree. I was ready to move to Spree. The thing is, Spree and its ecosystem of extensions wasn’t ready yet for us. Two key business requirements, namely multi-linguality (of both the views and database-stored content) and multi-currency, couldn’t be met unless I wrote all the code by myself. Which is kind of hard, considering the fact I have a full-time job and Bitspudlo.com is just a hobby project.

One Step At A Time

Being quite fluent with Globalize3 (actually being one of the maintainers of this awesome gem), back in november 2010 I’ve hacked the simplest working extension for globalizing names of products and categories (in Spree they’re called “taxons”, with a good reason behind that), basically gluing Spree and Globalize3 together. The simplicity of it made me love Ruby, Rails, Globalize and Spree even more. It was more like proof-of-concept, but good enought to consider Spree integrated with Globalize.

Around the same time (november 2010) when I was playing with making Spree globalizable, two talented programmers, namely pronix and parallel588 have started a Spree extension for multi-currency support, spree-multi-currency .

It was more than enough. There were no more excuses to avoid the migration.