I switched to OS X shortly after joining Alagad (all the cool kids were doing it…), and I have been quite pleased with both the stability and the feature-set available. I wanted to share some of the configuration tweaks I have found useful, tools I find indespensible, and configurations that have made my life easier while I write and debug ColdFusion applications on OS X.
I always install ColdFusion in multi-server mode. This allows me to run multiple versions of ColdFusion (even Railo) on the Jrun engine. After you run the normal install of CF with Multiserver, you can add additional ColdFusion engines from the Jrun management console, usually on port 8000. You will need to start the admin instance from the command line first, by navigating to /Applications/JRun4/bin/, then run ./jrun –start admin. Once it starts, you can navigate to http://localhost:8000. The username is ‘admin’ and the password will match the one you entered during the install process of ColdFusion. From here, you can choose ‘Create New Server’ on the top.
Once you give it a name, you can follow the deploy steps at http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=installj2ee_11.html or http://www.boyzoid.com/blog/index.cfm/2007/6/13/Running-CF8–CF-7-on-JRun-with-Apache to finish up. If you are like me, you will often have to test code on various ColdFusion engines, so I have created alias shortcuts to let me start them up quickly from the console. To setup aliases so they are available each time you go to a console, you need to edit your .profile file.
From a console, you can edit the file by typing ‘nano ~/.profile’ (after entering the new lines in nano, use ctrl-x to exit the editor, and enter ‘y’ to save your changes. I added the following 2 lines at the bottom of the file, so I can start either ColdFusion 8 or 9 by typing cf8-start or cf9-start.
alias cf8-start="sudo /Applications/JRun4/bin/jrun -config /configs/cf8-jvm.config start cf8" alias cf9-start="sudo /Applications/JRun4/bin/jrun -start cfusion"
My workhorse editor is still Eclipse with the CFEclipse plug-in. Add the update site http://cfeclipse.org/update to Eclipse, choose the CFEclipse plugin, and you will be all set. The other required plugin, of course, is Subclipse. Subclipse allows you to check out and work with Subversion repositories, and the subclipse site is located http://subclipse.tigris.org/update_1.6.x. Your projects can live anywhere on your hard drive, just configure Apache virtual-hosts to point to the web root so you can run your tests.
The apache configuration can be updated from /etc/apache2/httpd.conf, or the vhosts file at /etc/apache2/extra/httpd-vhosts.conf. After ColdFusion is hooked into the default httpd.conf file, with CF9 as the default server, you can add a few lines into your httpd-vhosts.conf file, per v-host, to set your test site to use CF8 or Railo as needed. You have to add 2 lines to your v-host config to point it at a specific instance of your JRun server:
JRunConfig Bootstrap 127.0.0.1:51000 JRunConfig Serverstore /Applications/JRun4/lib/wsconfig/cf8/jrunserver.store
Textmate is my go-to editor for anything not in an Eclipse project. This is an amazing editor, with bundles to do darn near anything: coldfusion, ant, XML, subversion (built in), SQL (built in), and so much more. TextMate is super fast, lightweight, and has an awesome dark color theme built right in so my eyes don’t have to stare at black on white all day. If you like Notepad++ on windows, you will love TextMate on OS X.
I hope this helps someone out there, trying to decide if it’s worth making the jump to OS X. I believe it was the right move for me, and am really enjoying some of the unique tools available for the Mac.