Read my latest article: 8 things I look for in a Ruby on Rails app (posted Thu, 06 Jul 2017 17:59:00 GMT)

Starting MySQL after upgrading to OS X Leopard

Posted by Sat, 27 Oct 2007 11:13:00 GMT

If you upgraded to OS X Leopard and are running MySQL from the MySQL.com installer1, you might be having some problems with starting it from the GUI interface. There isn’t a fix from MySQL yet, so to get around that… you can run it from the command-line.

Start MySQL from the command line

cd /usr/local/mysql; ./bin/mysqld_safe &

This should get MySQL up and running for you. If someone wants to share a tip on how to get this to start automatically on reboot, please post a comment and I’ll help get the word out.

1 I didn’t have this problem as I installed MySQL via MacPorts... but this came up for a few members of PLANET ARGON after they upgraded to Leopard.

Using MacPorts Ruby and Rails after Upgrading to OS X Leopard

Posted by Sat, 27 Oct 2007 10:43:00 GMT

If you previously followed my article, Installing Ruby on Rails and PostgreSQL on OS X, second edition and are now upgrading to OS X Leopard, you’ll want to make a few adjustments to your setup.

First of all, it’s great that Apple has decided to provide Ruby on Rails out of the box.


~ > gem list rails                                                                                                                                                                   
  *** LOCAL GEMS ***

  rails (1.2.3)
      Web-application framework with template engine, control-flow layer,
      and ORM.
How many gems does it come with?

~ > gem list|grep '^[a-z]'|wc -l                                                                                                                                                     
      29

It’s really great that Apple shipped Leopard pre-installed with 29 gems, especially if you don’t have your entire Rails stack setup already. In my case and for those that have followed my installation process, you don’t need to switch over to this new development stack (yet). I have a lot of time invested in my fully-functionaly MacPorts installation process (PostgreSQL, MySQL, RMagick, Subversion, Git, etc. Since this all working fine on my machine, I’m not ready to make the switch to Apple’s installation.

Don’t Fix it… if it’s not broken!

So, the the first thing that I did was modify my PATH environment variable, which has /usr/bin as the first path that it’ll look at when you try to run commands like ruby, mongrel_rails, gem, etc. You’ll want to modify this and prepend /opt/local/bin: to the front of PATH in your shell configuration. If you’re using bash, this would be… ~/.bashrc. If you’re using zshell like me, ~/.zshrc.

Now, when you start a new Terminal and run gem list, you’ll see all of the gems that you already have installed.


~ > gem list rails                                                                                                                                   < new-host

*** LOCAL GEMS ***

rails (1.2.5, 1.2.4, 1.2.3, 1.1.6)
    Web-application framework with template engine, control-flow layer,
    and ORM.

Back to my happy gems…


~ > gem list|grep '^[a-z]'|wc -l                                                                                                                                                              < new-host
      72

Great! Now I can get back to work and spend time playing with the new features in Finder, Mail.app, and iChat instead of installing all of the software dependencies that our development projects have. :-)

OS X Leopard Tip: Skitch on Every Space

Posted by Sat, 27 Oct 2007 03:43:00 GMT

If you’re using Skitch and the new Spaces in OS X Leopard, I would encourage you to set the following up.

This will allow you to use Skitch on any Space without needing to move it around. Took me a few minutes to figure out that I could set it up like this.

As you can see… I’m on Leopard now… only took three tries.