From: Vince Angeloni Date: 2009-03-22T08:56:39+09:00 Subject: Re: Run a Ruby script (.rbw) from a dock shortcut in Mac OS unknown wrote: > Is there a way to put a shortcut down in the dock so I can just click > it to run the particular Ruby script (or click it from within > Finder)? > > Thanks. You should save the file as a Ruby file, but it must be made 'executable' to run as a script and not open in Terminal. To do this in terminal you need to use: chmod 755 /path/to/your/file This will keep it from opening in Terminal. But it won't be an application, so I don't think you can put it in the dock where you want it. If you want an Application which you can put on the dock, then you will need to wrap your script using Platypus (http://www.sveinbjorn.org/platypus). Platypus can take ruby (and other script langs) and create double clickable applications from them. You can also save your script with a unique prefix and name which will allow you to use Spotlight to run it. For example, save your script as xxMyScript.rb and you can access it relatively quickly using Spotlight in 10.5 (much slower and different key combinations on Tiger): 1) type cmd-spacebar to set focus to spotlight search field 2) type 'xx.MyS' and wait a sec for it to appear in the "Top Hit" of the Spotlight search results 3) type return when you see it as the "Top Hit" and it will launch and run. hth vince -- Posted via http://www.ruby-forum.com/.