1

I am trying to run growlnotify from inside a ruby script. The command I am using is this system("growlnotify Test -m message").

If I use the terminal to execute the script it works fine. If I use Textmate to run the script or Geektool (the eventual target of the script) it does not ever run the growlnotify part. Each other part of the script runs using Textmate or Geektool, but only using the terminal causes Growl to launch a notification window.

Anyone used this tool before?

James P. Wright
  • 8,991
  • 23
  • 79
  • 142
  • Use backticks instead of system. Than you will get the error message to stdout and see why it failed. – johannes Dec 07 '09 at 09:45

2 Answers2

4

Is growlnotify in the PATH that TextMate uses?

Try passing the complete path to growlnotify: ie /usr/local/bin/growlnotify

Matthew Schinckel
  • 35,041
  • 6
  • 86
  • 121
0

A backtick is the little apostrophe like mark on the same key as the tilde.

`growlnotify -m message`

does the same thing as

system("growlnotify -m message")

except it also gives you the output of the command.

Another variation is

%x{growlnotify -m message}
Moshe Katz
  • 15,992
  • 7
  • 69
  • 116
jhickner
  • 1,043
  • 10
  • 15