Pages

The application Mail quit unexpectedly - GrowlMail problems

One of my favorite–yet least mentioned–free utilities is Growl, a universal notification service for Mac that lets applications notify you of events. Now instead of each application deciding on how they want to present notifications for things like new mail, incoming tweets, etc. you can control it in a single place, assuming the application supports Growl or an extension has been written for it.

Such is the case with Mail.app. Though Mail.app is not written to support Growl the developers for Growl have created an "extra" that can provide that functionality. I've been using this setup for a while now and have been quite pleased with it.

After upgrading to Safari 4 I suddenly found that Mail.app was crashing on me as soon as a new e-mail came in. Here is the error message I was getting:

Which was followed by:

Reset and relaunch had no effect - Mail.app just crashed again. It turns out that an error has been introduced into Growl after upgrading to Safari 4 that creates this crash. There are two solutions to this problem:

Solution 1: Change Mail.app notification to Summary
The problem for Growl is when individual e-mail notifications come in; that's what is causing the crash. If you don't have any new e-mail (which causes the crash) you can load up the Mail.app preferences and switch to the Growl tab, then change the setting to summary mode:

If however you can't load mail up to get to that setting you can accomplish it by changing it through the terminal. Load up a terminal window and enter the following command:


defaults write com.apple.mail GMSummaryMode -int 2


This will change the setting for you and allow you to load up Mail.app. The downside to this is if you still want individual mail message notifications. For that you can use Solution 2.

Solution 2: Install Growl Beta 1.1.5B2
There is a beta version of Growl that addresses this issue; you can grab it from the Growl beta page. Just download the DMG and install the latest Growl package AND the newer Mail.app extension (in the Extra folder). This is of course beta software but I've been running it for a while on two of my Macs and it's been running fine so far.

If you have any work-arounds on this please drop a note in the comments. I was able to find most of this information but it was a bit scattered. Hopefully people searching when they get the error will find this helpful.

Book resources for learning Ruby on Rails

I've now been using Ruby on Rails for a little over a year and have found it to be a fantastic environment to build web based applications. The last year has not been without some serious pain and learning curves and while I hardly consider myself a master of the environment I've found a number of resources that may help you if you are considering using RoR as a development platform.

Sure, you can access nearly everything you need to learn RoR online but I am personally still addicted to the dead-tree model of learning. If you are like me and prefer buying books then read on. In the last year I've bought 10 books on various Ruby/Rails topics and what follows are the ones I've gotten the most use out of.

NOTE: Ruby on Rails is a constantly evolving environment and the information below is really relevant for early June 2009. Things can change in the Rails world relatively quickly. It's a good idea to stay up on Rails developments by following the Ruby on Rails blog at a minimum.

Learn Ruby First
Before you rush out to buy a Ruby on Rails specific book first you need to learn Ruby the programming language. If you've been writing applications in C/C++/C#/Pascal (like I had) then Ruby is a relatively easy language to learn. Since it is open source getting a copy of Ruby is usually just a matter of downloading it to your machine and running it. Mac users have a big advantage here because Ruby is bundled in with Leopard.

Though you can get up and running with Rails while having a very modest knowledge of Ruby I can't stress enough that you should take the time to understand Ruby before you dive into Rails. Why? Because building a basic application with Rails is so easy that you will be tempted (as I did) to just start building. If you haven't really learned the Ruby language you will take a lot for granted and not understand why things work the way they do. You will copy and paste code rather than write it and when you do write it you will likely not write it well.

The book nearly everyone talks about for learning Ruby is "the PickAxe book" by Dave Thomas: Programming Ruby. Dave Thomas has a great conversational writing style. He makes learning Ruby almost story like, walking you through code samples while providing deep coverage of the Ruby language. At 1000 pages (3rd edition) there is a lot of material here, including a reference for the core Ruby library.

If you want to become adept at using Rails you do not need to read the book cover to cover but should get through Part I before you start doing anything of significance.

Rarely do I count on a single text book to provide my knowledge of a subject and that's the case with Ruby. Based on a blog reader recommendation I also picked up The Ruby Way by Hal Fulton. Though it's nearly interchangeable with the PickAxe book, Hal Fulton has a very different writing style. Rather than weaving a story I've found The Ruby Way to be more reference like. While I started learning Ruby with the PickAxe book I find myself grabbing The Ruby Way more often now when I need to explore an area that I don't understand as well as I would like.

Both of these books are excellent resources for learning about the Ruby language and I recommend having them in your library.

Rails References
Once you have got a good grasp on the Ruby language you can dive into Rails. Once again I have two books that I turn to frequently. One is for learning/getting started, the other is a desktop reference.

While you can find lots of excellent quick tutorials for getting your first Rails application up and running quickly on the web (such as Sean Lynch's excellent tutorial for Rails 2.0) it can't match the depth of a book. Agile Web Development with Rails (AWDR) by Sam Ruby, Dave Thomas and David Heinemeier Hansson is a good way to walk through building your first Ruby on Rails application.

The authors use a step-by-step style to build up an online bookstore, providing side roads and discussion points along the way. Some of the core philosophies of Rails are mentioned here (like DRY), though they don't go into a lot of detail. I personally found that good; what I was looking for was a relatively light-weight book that takes me quickly through building an application so that I could see results. AWDR does that and starts to show off some of the cool things you can do in a Rails application.

If you are going to use Rails for anything other than playing around you need a good reference book that helps explain things in more detail than AWDR. By far my favorite Ruby on Rails book is The Rails Way by Obie Fernandez. This book is not by any stretch a book for helping you get started with Rails; instead The Rails Way covers how things really work inside of Rails. Want to understand what's really happening with a Controller? How routing works? How to really leverage ActiveRecord? Get this book.

Obie has created a great desktop reference that you can pick up and dive in at just about any point. You don't read The Rails Way cover to cover; you keep it handy and pop it open when you need to know more about something you're working on.

So there you have it, four great books on Ruby and Rails that will help you get started building applications in that environment. As I said at the beginning, Rails is a rapidly evolving environment and it's difficult for books to keep up.

Got a book for Ruby or Rails that you really like? A web site with excellent tutorials? Please drop a note in the comments and share.