Archive for the ‘Snow Leopard’ Category

Ruby on Rails mysql gem in Snow Leopard with MacPorts

Thursday, June 3rd, 2010

Because I have to look it up every time!

If you want to install the ruby mysql gem on a machine running Snow Leopard with mysql installed via mac ports:

sudo env ARCHFLAGS="-arch x86_64" gem install mysql --  --with-mysql-config=/opt/local/lib/mysql5/bin/mysql_config

Encrypted folder on Snow Leopard

Tuesday, June 1st, 2010

I recently had a need to create a password protected folder on my Mac.  Did a little digging and found DiskUtility to be the answer.

  1. Open DiskUtility at ~/Applications/Utilities/Disk Utility
  2. File > New > Disk Image From Folder
  3. Select a folder and click the Image button
  4. Image Format -> read/write (if you want to be able to modify the contents)
  5. Encryption -> 128-bit AES
  6. Enter and confirm password
  7. Password protected folder is created

This was great.  My encrypted folder is now mounted at /Volumes/name_of_folder when I open the *.dmg file.  Except that I needed to add files to the folder periodically and the disk image I had created was bound by the original size, give or take a few bytes.

So start over.  Did a little more digging and found sparse images. Sparse Image

  1. Open DiskUtility at ~/Applications/Utilities/Disk Utility
  2. Click New Image icon, making sure that nothing is selected on the left hand side
  3. Enter a name in the Save As field.  This will be the filename of the sparseimage file
  4. Enter a name in the Name field.  This is the name of the disk image that will be opened
  5. Choose a maximum size for the disk image
  6. Choose 128-bit AES encyrption
  7. Choose sparse disk image under Image format
  8. Confirm password
  9. Create your sparseimage file

Done.  Now click on the *.sparseimage and your disk image is mounted as /Volumes/name_of_disk_image.  Add, delete and modify to your heart’s content.