From: Lex Williams Date: 2008-09-25T20:50:56+09:00 Subject: Re: Invocation of ruby interpreter for .rb files under bash the first line should be #!/usr/bin/ruby or wherever your script is. Next, you have to mark the script as beeing executable . chmod +x foo.rb Note that since the first line of your script is #!/usr/bin/ruby ( or wherever your ruby binary is located ) , the script's name doesn't have to end with .rb. After that , you can just write : ./foo -- Posted via http://www.ruby-forum.com/.