Tag: ruby on rails

11
Feb

On Portability and Web Development

A friend linked me to this article this morning, and I think it’s worth a read. I’ve never given Google’s App Engine much of a look, largely because I’ve never gotten around the idea of compiled code running web apps (for some reason interpreted languages just feel right, but then that’s what I’m used to, and this is a post for another day anyway…). But there is something very interesting in that article, and that’s the portability of App Engine applications that would be obtained by having a number of cloud providers running AppScale.

In my time as a web developer I’ve done more than my fair share of server migrations, and each one has been horrible. It’s never an easy task, always fraught with issues, and almost always results in some amount of downtime (partly due to DNS switchover, but often a result of improper config on the new server as well).

Those sites were largely PHP, and only a handful were running Cake (which does make some things easier, but introduces other headaches as well). I’ve yet to do a server migration using Rails, but I can imagine it is a bit easier thanks to gems, capistrano and the like. But I’m sure the multitude of server configurations required – Apache, MySQL, email servers etc – mean that it’s never as easy as it possibly could be.

Wouldn’t it be great if we could abstract all of this? Wouldn’t it be great if I could open an account on a cloud provider, put its details in Capistrano (or whatever), click go and have my app running there instantly. I’m sure there are ways and providers that will do that for you. I’ve not looked incredibly deeply, but Engine Yard might do this, and it doesn’t look particularly cheap (not compared to, say a SliceHost VPS or the MediaTemple GS, both of which I run). It’d be awesome if there were the free quotas that App Engine offers, so that people could get into deploying real web apps without the hassle of manually configuring cheap servers or the cost of affording the top range hosts. Does anyone know of anything that does this?

15
Sep

What’s happening to me?!

I did some work on a CakePHP site earlier today, and I pretty much hated every minute of it. Somehow, I’ve gone from the kind of person who does everything in PHP, to one of those fanatical Ruby on Rails developers. There’s only one thing for it: I must re-write everything I’ve ever done in RoR! OK, maybe I won’t go that far. Yet…

14
Sep

MySQL gem on OSX with XAMPP

I’ve just upgraded to Snow Leopard, and as a result, have had to reinstall my MySQL gem for Rails. On OSX, this is never easy, as the sheer number of blog posts offering advice will show. Having tried all the different solutions I could find, this is how I managed it. Note that because I am on a Core Duo machine (not a Core 2 Duo), I didn’t upgrade to the 64 bit version of MySQL.

Open up a Terminal, and edit the .profile file, to add the following to modify your path:

export PATH="/Applications/XAMPP/xamppfiles/bin:$PATH"

Run:

sudo sh env ARCHFLAGS="-arch i386" gem install mysql

You might see a load of warnings, but as long as it doesn’t fail, then they’re not too important. You can check it’s worked by running:
gem list -d mysql

This way you don’t need to bother with all the setting mysql_config flags. Or, at least, I didn’t need to. Hopefully this will work for you!