There certainly isn’t a “shortage”:https://rubygems.org/search?utf8=%E2%9C%93&query=growl of “growl”:http://growl.info/ notification libraries out there for “Ruby”:http://www.ruby-lang.org/en/about/. Most of them are built on top of the “ruby-growl”:https://github.com/drbrain/ruby-growl gem which uses Growl’s network API to post notifications.
I wasn’t a fan of using ruby-growl for several reasons:
* It required that you open a port on your machine
* It spawned a new process for each new notification
* The network API wasn’t particularly reliable
I did take a peek at Growl’s archaic ruby “bindings”:http://growl.info/documentation/developer/bindings.php. However, it requires “RubyCocoa”:http://en.wikipedia.org/wiki/RubyCocoa to work which means it can’t be used outside the installed version of Ruby that comes with MacOS X.
I decided it was time to throw my hat into the ring of ubiquitous growl libraries. Say hello to “real-growl”:http://github.com/dewind/real-growl: An easy-to-use growl notification built using native bindings.
h2. Using it
The easiest way to get started is to use the ‘rg’ method — which works just like the “g gem”:https://rubygems.org/gems/g.
If you want, you can create your own custom Growl application.
h2. Installation
# “Download”:http://growl.cachefly.net/Growl-1.2.2-SDK.dmg and copy Growl.framework to /Library/Frameworks
# gem install real-growl
h2. What’s next
* Support for growl click notifications
* Add an executable script
Enjoy!
Hey there, this looks really awesome, but I’m having a problem installing the gem on Lion – looks like I might be using the wrong growl framework, or the native extensions are just off – any ideas? Would really love to use this.
Hi Sean,
It appears you are trying to build it using MacRuby. MacRuby uses garbage collection and RealGrowl does not which is causing a linking error. I’ve never attempted to compile and run RealGrowl against MacRuby. I’ve created an issue on github to address this.
Any progress on click notifications? :-)
Sergei,
I have not. The reason is that is requires another process (using NSApplication) in order for it receive interprocess events. I haven’t thought if a particularly good strategy to do this yet. :-)