Rake aborted! Uninitialized constant MysqlCompat::MysqlRes

Leave a comment


When attempting to do a Ruby on Rails rake db:migrate on Mac OS X, you receive the following error message:

rake aborted!
uninitialized constant MysqlCompat::MysqlRes


Steven Hamton over at TechLiberty came up with the solution for this one:

sudo gem uninstall mysql

Prior to Leopard:
sudo gem install mysql — –with-mysql-dir=/usr/local/mysql
Leopard on a PPC machine:
sudo env ARCHFLAGS=”-arch ppc” gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config
Leopard on an Intel machine:
sudo env ARCHFLAGS=”-arch i386″ gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config
Snow Leopard (only on Intel):
sudo env ARCHFLAGS=”-arch x86_64″ gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config


Recursively Change File Permissions on Folders Only – Linux/Unix

Leave a comment


You want to recursively change all of the file permissions only on folders & subfolders in a directory, but not the files (or vice-versa: you want to change the permissions on files only, not folders).


This command will recursively search your current directory and chmod all directories & sub-directories only:

cd /yourdirectory

find . -type d -exec chmod 755 {} \;

The following command will chmod all files only (ignoring the directories):

cd /yourdirectory

find . -type f -exec chmod 644 {} \;

Solution Credit: MovableTripe

Update WordPress Without FTP



You want to update your WordPress installation or plugin automatically, but do want to setup FTP access on your server installation (or your hosting provider does not provide access).


Add the following line to your wp-config.php file:


WordPress will now update directly without requiring FTP access.

Debian 5: HP Proliant DL360 or DL380 G5 Freezes After POST

Leave a comment


HP DL360 or DL380 will freeze on boot up after POST when Debian 5 (“Lenny”) has been installed


During the install process, Debian will request a firmware file for the onboard Broadcom NIC (bnx2-06-4.0.5.fw), either on a USB floppy or USB stick.

If the USB device is left connected to server for the remainder of the install process, Grub will be installed to the USB device, not to the master boot sector of the hard drive.  The server will not boot unless the USB device is connected to the server.


1) Remove the USB device before the Grub installation begins


2) Run grub-install to the /dev/cciss/c0d0 device after install