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.

Shared bookmarks for del.icio.us user infovore on 2005-08-07

Bah

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?

Hear the Tiger RoR

07 August 2005

Well, there’s a thing. I managed (with relatively no hassle) to get a local install of Ruby on Rails up and running on my 10.4.0 Powerbook. Quite surprised – given the scattered documentation – that it went so well. For reference, I used these instructions, which worked exactly as specified. I did already have an install of MySQL, but that was dead easy when I did it a few months ago, too.

Update: of course, then I ran into problems. What I discovered is that those instructions are for an install of Tiger with XCode 2.0, which still only has gcc 3.3. I upgraded to XCode 2.1, and gcc upgraded to 4.0 – and there my troubles began. Of course, then I solved them.

Now to get to work in it. I have an application in mind that it would be ideally suitable for; whether or not I can get my head around the language (especially without making my forget the other ones I know) is another matter. If I was a real programmer, I’m sure this wouldn’t be a problem, but alas, I’m not. Ah well.