From: Kaye Ng Date: 2012-12-27T01:14:58+09:00 Subject: Re: How do I install Ruby on my Ubuntu 12.10 partition. Derrick B. wrote in post #1090185: > > You can simply type: > > $ ruby interactive.rb > > ... from the shell prompt, and that should do it. The dollar sign > indicates your shell prompt and is not meant to be typed. Only type > what follows the dollar sign. > > To make your Ruby file executable, first find your Ruby executable: > > $ which ruby > > ---example output--- > /usr/bin/ruby > > ...then add this line as the FIRST line of your Ruby file: > > #!/usr/bin/ruby > > IMPORTANT: Make sure that path matches the path found using the "which" > command. > > Lastly, type: > > $ chmod 755 interactive.rb > > ...to make your file executable. Now all you need to do is type: > > $ ./interactive.rb > > ...and it should be executed. Thanks a lot guys. Derrick, /usr/bin/ruby is right. So I edited the file with Ubuntu's text editor, added #!/usr/bin/ruby (with the pound sign) , then saved it. Went back to shell prompt. Typed: chmod 755 Dungeon_interactive.rb Got this: chmod: cannot access `Dungeon_interactive.rb': No such file or directory Does my ruby file Dungeon_interactive.rb being in my THUMB DRIVE have anything to do with it? Thanks a lot!!! -- Posted via http://www.ruby-forum.com/.