Ask for Help
‘How do I get growl output using ruby-growl in irb?’
Seen at a RubyConf lightning talk, ruby-growl (aka “g”) is a library that provides a global “g” method
that you can use to inspect objects much like Kernel#p. Instead of printing the output to console
the output goes to Growl, a popular OS X global notifications tool.
require 'ruby-growl'
g = Growl.new "localhost", "ruby-growl",
["ruby-growl Notification"]
g.notify "ruby-growl Notification", "It Came From Ruby-Growl",
"Greetings!"
Trying this out we are seeing the following error message:
Errno::ECONNREFUSED: Connection refused - send(2)
Tried these instructions to enable incoming notifications but still doesn’t work. Anyone?
‘Keycastr’ not working
KeyCastr is a Mac OS X application that displays your keystrokes in a small floating window much like growl – useful for
overhead projection, and we use it around here for everyday pair programming to answer the question “What key did you just press?”
If you are having troubles getting this to work, try enabling the checkbox in System Preferences -> Universal Access in the “Seeing” tab called “Enable access for assistive devices”

Interesting Things

- Using uneval in SpiderMonkey JavaScript shell
When you are doing development in JavaScript using js shell and you try to inspect an object, all you can see is [object Object]
js> x = {foo: 'bar', baz: 1}
[object Object]
A convenient if obscure way to see more detail is uneval()
js> x = {foo: 'bar', baz: 1}
js> uneval(x)
({foo:"bar", baz:1})
For g you need to ensure you not only allow remote applications to connect but that you also allow remote applications to register. Check Growl’s properties — specifically under the network tab.
November 23, 2009 at 8:07 pm
You may also need to restart Growl after you follow those instructions.
November 23, 2009 at 8:19 pm
Thanks for the tip. Did some digging and found these instructions, which are nice and clear: < http://bbrinck.com/post/73830054/getting-ruby-growl-to-work>
November 23, 2009 at 8:57 pm