Sharing Wireless iMac connection to PS3

December 23rd, 2008 | Uncategorized | 1 Comment »

My girlfriend won a PS3 at work yesterday. So yeah, Christmas came early for me!  Before I started any gaming I wanted to see what the media centre capabilities were but I ran into some trouble with the wireless setup. Here’s what I did. This is not meant to be a beginners step by step guide but It will point you in the right direction if you run into this problem.

Read on »

Moved to Slicehost

December 22nd, 2008 | Uncategorized | No Comments »

I completed my move from GoDaddy to Slicehost over the weekend. My move to a grown up host was long overdue. I went with a 256mb slice to start with and Ubuntu 8.04.  I have to say Slicehost are superb and I’d recommend them to anyone, my only problem, though it’s not their fault is that I do notice a small bit of latency when I’m issuing commands over ssh, but hey I’m almost on the other side of the world, what can you do?

I’m now running Wordpress 2.7 served up with Nginx and PHP over fast-cgi. I don’t get much traffic but if I ever do I’ll be able to handle it.

That’s all for now. Enjoy the Holidays.

Problem installing Rubygems on Ubuntu

September 15th, 2008 | Uncategorized | 1 Comment »

I was installing Rubygems 1.2.0 on Ubuntu 7.04 on Friday, something I’ve done many times but for the first time I saw this error when I ran sudo ruby setup.rb

./lib/rubygems/spec_fetcher.rb:1:in `require': no such file to load -- zlib (LoadError)
	from ./lib/rubygems/spec_fetcher.rb:1
	from ./lib/rubygems/source_index.rb:10:in `require'
	from ./lib/rubygems/source_index.rb:10
	from ./lib/rubygems.rb:767:in `require'
	from ./lib/rubygems.rb:767
	from setup.rb:22:in `require'
	from setup.rb:22

Having a look around the web yielded several approaches to solve the problem but no solution so I decided to build Zlib from source, then rebuild Ruby and then install Rubygems. That worked.
Read on »

Mysql gem on OSX Leopard

September 8th, 2008 | Uncategorized | No Comments »

Just a quick note on a problem I ran into this morning.

I needed the mysql gem so I ran gem install mysql only to find I got the following error:

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.

The solution was to use the following:
gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

It should work as long as the path to mysql_config is correct, you may need to change the path for your own system. You can check the path to mysql_config with: which mysql_config

Disable active record in Rails 2.1.0

August 25th, 2008 | Uncategorized | No Comments »

I've had a bit of trouble trying to disable active record in my rails app today.  I set the following in environment.rb as I had done before in rails 2.0.2:

RUBY:
  1. config.frameworks -= [ :active_record ]

However it resulted in the following error:

RUBY:
  1. vendor/rails/activesupport/lib/active_support/dependencies.rb:278:in `load_missing_constant': uninitialized constant ActiveRecord (NameError)

The problem is that [your app]/config/initializers/new_rails_defaults.rb should check to see if ActiveRecord is enabled before it references it. A patch for this has already been checked into the rails codebase but if you don't want to wait for the next release you can get the patch from the link below and apply it yourself:

http://github.com/rails/rails/tree/4b4aa8f6e08ba2aa2ddce56f1d5b631a78eeef6c/railties/configs/initializers/new_rails_defaults.rb

Note:
I made the mistake of applying this patch directly to rails/railties/configs/initializers/new_rails_defaults.rb as the patch does and wondered then why the fix didn't work. It would work for any new rails apps that you create but you'll need to apply it to config/initializers/new_rails_defaults.rb in your rails app in order for this to work.

Michael Fix - Message in a Bottle (cover)

July 15th, 2008 | Uncategorized | 1 Comment »

I've finally got around to taking guitar lessons which I started about a month ago. The lessons have been giving me an even greater appreciation for finger-style playing. Actually if anyone is thinking about taking lessons I highly recommend my teacher, check out http://www.flyingfingers.ie for more information.

I stumbled across this great great YouTube find this morning and wanted to highlight it. I love The Police and 'Message in a Bottle' is one of my all-time favourite songs. This cover is just brilliant.

Internal Server Error on post.php after upgrading Wordpress

June 16th, 2008 | Uncategorized | 1 Comment »

I recently upgraded my copy of wordpress to 2.5.1. All apparently went smoothly until I tried to write a new post. When I pressed 'publish' the page would hang for a while and then return an Internal Server Error.

For those of you experiencing the same trouble. The problem was with the database. I uploaded my mysqldump of the wordpress db via phpMyAdmin on GoDaddy, I had enough grief as it was trying to get the script to go through properly, the problem was that it neglected to assign the AUTO_INCREMENT property to ID fields on all my wordpress tables. So effectively I could not create new rows.

Thanks to Ken for pointing me in the right direction.