One of the stumbling blocks, as a beginner, is finding out which tools are the most appropriate for your work. When starting to learn Ruby, and Ruby on Rails, and using a Macintosh, I found that there was a strong emphasis on the (quite excellent) TextMate editor.
Unfortunately, I found that although TextMate is certainly feature-full, and very powerful, it also has an extremely steep learning curve – to me, steeper than learning Ruby or Rails itself.
I also found, that while developing my RoR apps using a ‘normal’ editor, my desktop was becoming cluttered with an incredible amount of windows. I might have 2 or 3 windows from ‘Terminal’: one for starting and monitoring my app, one for script generation, one for checking documentation with ri. I might also have 2 or 3 browser windows open: one for my app, one for checking the Ruby/Rails online docs. I might also have one of the reference eBooks open on the side, in Preview. Then, I’d have the actual text editor. When the time comes to design the ‘interface’ of the site, I’d have even more windows open – a graphical css editor, as well as the graphics editor… Even with the ‘Spaces’ feature of Leopard, navigating all those windows was driving me mad.
That is when I came across Coda, an application from Panic Software, the same folks who make the venerable ‘Transmit’ ftp client. Coda allows you to ‘manage’ your site/app in one single window, by bundling together a text editor, a graphical css editor, a terminal, and an ftp client into one single app – with a lot of eye candy. It has even won an award from Apple for ‘Best User Experience’. For further and more detailed information, consult their official site, on: http://www.panic.com
The procedure I’ve been using to program RoR apps using Coda is as follows:
1) launch Coda, and before opening any sites, click in the ‘Terminal’ button in the toolbar. This will open a ‘terminal’ tab. Inside the tab, select ‘Connect to a local shell’ from the connection menu, to launch a local terminal. You can then use this local terminal – and the ‘rails’ command – to generate a new site, as you would do normally from the ‘Terminal’ app. Generate your new site, then ‘exit’ the terminal.
2) Now, add a new site in Coda – click the ‘Sites’ button in the toolbar, then the ‘Add site..’ button in the sites pane. Use the directory just created by your ‘rails’ command in step 1 as the ‘local’ directory of the new site. Add as much or little information about your new Rails site/app as you wish – Coda can keep useful information, such as remote shell and ftp login info for your web hosting provider, together with the site information. If you already know these details, you can add them now – or you can add them at a later stage, if you don’t.
Done! You can now edit your rails app directly inside Coda, just as you would edit any other site – consult the Coda help menu and documentation. Coda allows you to have tabs, as well as several ‘panes’ per tab. Each tab/pane can contain a text editor, a terminal window, a web preview, or a graphical css editor. You can literally do all your site editing from one single window. Uploads/downloads to web hosts can be done via the built-in ftp client, which also allows files to be edited directly on the host.
Coda has excellent support for html/css/javascript/php – including code hints, and a built-in reference library. These features are not available for Ruby or Rails, yet. Nevertheless, there are many other features – such as ‘code snippets’, and ‘easy regex builder’ – which are, indeed, quite valuable, and thanks to Coda’s ease-of-use, much easier for a beginner to understand and use than in competing products.
There are, however, some glaring and obvious omissions in Coda’s feature list. At the present time, Coda is unable to do site-wide searches, for instance, and its terminal implementation does not support as many features as Apple’s own ‘Terminal’ app. Nevertheless, Coda is still in its infancy, and its developers are approachable, and responsive. If the RoR community shows interest in the product, this could become a fantastic tool, that can help newbies like me learn faster, and feel less scared.