From: matt@... (matt neuburg) Date: 2007-08-01T14:40:00+09:00 Subject: Re: Running Ruby Program from Mac OS X Desktop Alex DeCaria wrote: > I have a Ruby program on my Mac desktop and when I double click on it, > it doesn't run the program...it just opens up the text editor. How do I > make it run the program when I double click on it? You need to give the program the .command extension and set it to open in the Terminal. Example: #!/usr/bin/env ruby puts "Hello, world!" Save that as hello.command. Use the Terminal (or whatever) to make hello.command executable by user. Use Get Info in the Finder to specify that hello.command should open with Terminal. That's all. Now when you double-click hello.command in the Finder, it will run in the Terminal: mattneub$ /Users/mattneub/Desktop/hello.command; exit Hello, world! logout [Process completed] m. -- matt neuburg, phd = matt@tidbits.com, http://www.tidbits.com/matt/ Tiger - http://www.takecontrolbooks.com/tiger-customizing.html AppleScript - http://www.amazon.com/gp/product/0596102119 Read TidBITS! It's free and smart. http://www.tidbits.com