So, this blog (for its sins) is running on WordPress 2.0.5. That’s a bit out-of-date. The main reason is because it has all sorts of jiggery-pokery to make it work the way I want – a tagging solution based on Jerome’s Keywords that was modified when I moved to 2.0; all sorts of template hacking to make the beautiful breadcrumb trail at the top you see work.

I’ve resisted upgrading due to the hell that was hacking plugins and templates into future versions of WordPress. Until now, that is. WordPress 2.3 (finally) introduces a proper tagging solution – entirely separate to the “categories” system. Well, not quite, as we’ll see – but it finally means that the architecture of is now entirely possible within WordPress itself.

Of course, now you’ve got to convert your custom tagging solution to the new schema. I’ve written a small script to do this for myself – only took about an hour, and that’s mainly because I was exploring the schema, and my PHP is a little rusty. Of course, now I know a reasonable amount about how tagging is implemented in WordPress 2.3, and felt I should write this up properly, so that anybody else converting custom tagging solutions might save themselves some time.

Continue reading this post…

Haha! I solved the problem in the previous post with some cunning. And Google.

Basically, even though it looks like the mysql gem has installed correctly, it won’t have, because, once you’ve upgraded to Xcode 2.1, gcc is upgraded to 4.0. If you try and install the gem with gcc 4.0, it breaks. You need to install it with gcc 3.3 as your compiler. Doing this is as easy as typing

sudo gcc_select 3.3

in your terminal window before you run

sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql

Once you’ve done all that, you can then type sudo gcc_select 4.o to return things to normal.

Phew. Scaffolds now work. That was an exciting little detour.


07 August 2005

So much for the success with Ruby on Rails detailed in the last post. Everything was going fine until I tried to create a scaffold. At which point I get a nasty little MySQL error:

Access denied for user ''@'localhost' (using password: NO)

So basically, even though I’ve defined all the database settings correctly in the database.yml file for the application, it’s trying to connect without a username or password. And as such, quite rightly, is failing. I’ve reinstalled the mysql gem, I’ve tried configuring the database.yml file to connect as root; none of it works. Bit frustrated – I can’t see that I’ve done anything wrong, but it’s just not working. I’ve also tried users with both old and new password hashes, and that hasn’t helped either. Anyone got any ideas? Anyone? Lazyweb?