Ruby on Rails doesn't quite work on Mac OS X

Ruby on Rails is gaining in popularity when it comes to creating web sites. And no wonder, the features within the framework seems ideal for an agile development process. So naturally, I wanted to try it out on my new Macbook Pro.

Since I wanted control on the installation process, I followed the guide on for OS X. Everything went fine until I got the following error:

dyld: NSLinkModule() error
dyld: Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib
Referenced from: /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle
Reason: image not found

To fix this problem, issue the following command:

sudo install_name_tool -change \
  /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib \
  /usr/local/mysql/lib/libmysqlclient.15.dylib \

With this change I seem to be having a fully working Rails environment.

Upgrade Thinkpad BIOS from Ubuntu

OK, so you have installed Ubuntu or another version of GNU/Linux on your Thinkpad and realise that you need to upgrade your BIOS. The files are available on Lenovo’s web site to create a bootable diskette. The problem is that the application is for Windows.

Not to worry. Just download the BIOS update application, extract the diskette image and use it to create an ISO file that you can then burn to a bootable CD.

> wget
> cabextract spsuiv69.exe
> mkisofs -b IVUJ11US.IMG  -o biosboot.iso IVUJ11US.IMG

Then just burn the file biosboot.iso using your favourite ISO burner. Boot from the CD and follow the on-screen instructions.

Please note that, while this worked for me, I take no responsibility for what happens. There is always the risk of BIOS upgrades going wrong, turning the computer into an expensive paper weight.

Install Ubuntu 7.04 on Thinkpad A20p

When installing Ubuntu 7.04 Feisty Fawn on a Thinkpad A20p the display is a mess. In addition power management does not work which means that it is not possible to make the computer go into standby when the lid is closed. This article explains how to fix both issues.

To fix the display, you will need to break out of the desktop (Alt+Ctrl+F1) so that you can see what you are doing. Log on and get root privileges (sudo su) to be able to write the changes below.

Edit xorg.conf (nano -w /etc/X11/xorg.conf) and add the following (the existing Monitor section can be kept):

Section "Monitor"
Identifier      "Monitor0"
VendorName      "IBM"
ModelName       "ITSX93"
HorizSync       30-100
VertRefresh     50-100
ModeLine        "1400x1050" 122.00 1400 1464 1784 1912 \ 
                1050 1052 1064 1090 -HSync -VSync

N.B. There should be no line breaks in text after ModeLine.

Then change the reference to “Default Monitor” under the Screen section to Monitor0. Save the file with Ctrl+X Ctrl+Y. The setting will take effect when the system (or X-windows) is restarted.

The next issue was with the power management. The BIOS in the A20p is from before 2000 which is the cut-off year for ACPI support in Ubuntu 7.04. The computer has ACPI support but the kernel needs to be forced to load it. This is done by changing the boot options. To make the change persistent, edit the file /boot/grub/menu.lst.

nano -w /boot/grub/menu.lst
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=\ 12345678-1234-1234-1234-000000000000 \ ro quiet splash acpi=force

Reboot to make all changes take effect.