Hi, I recently got interested in starting to learn ruby. Since then I have done a few things. I have installed the newest ruby (1.8.4) to my /usr/local/bin/ . I also learned about TextMate, so I went and downloaded it. I played around with it and noticed that i could run the ruby script within textmate using Run Script. However, when I do this, i get two errors. One is /bin/bash: line 3: cat: command not found. This is at the beginning. After it says program exited normally, it says /bin/bash: line 8: rm: command not found. Also, it doesn't show any of the script as having run normally (didn't output anything). Does anyone know whats wrong? Thanks!
On Jul 27, 2006, at 7:29 PM, Frank Moda III wrote:
Hi, I recently got interested in starting to learn ruby. Since then I have done a few things. I have installed the newest ruby (1.8.4) to my /usr/local/bin/ . I also learned about TextMate, so I went and downloaded it. I played around with it and noticed that i could run the ruby script within textmate using Run Script. However, when I do this, i get two errors. One is /bin/bash: line 3: cat: command not found. This is at the beginning. After it says program exited normally, it says /bin/bash: line 8: rm: command not found. Also, it doesn't show any of the script as having run normally (didn't output anything). Does anyone know whats wrong? Thanks!
Looks like your script is executed as a shell script instead of a ruby script. What is the first line in the script? What is the language setting for the document (should be appearing at the bottom of the window.) Also try to run the "run script" command from the Ruby bundle, instead of using its shortcut.
Haris
Ok. I just opened Textmate and hit File -> New From Template -> Ruby -> Ruby Script. This opened a new file with some predefined commenting at the top. I simply put in puts "Hello World!" to test. I went to bundles -> ruby -> run script and I get a blue box. At the top i still have the missing cat command. Then in a light blue box it says it ran RubyMate r3391 running Ruby v1.8.4 and ran my untitled document. In another light blue box, it says Program Exited normally. At the end it shows the missing rm command error. At the bottome of the document it shows I am using the Ruby language setting.
On Jul 27, 2006, at 11:16 PM, Charilaos Skiadas wrote:
On Jul 27, 2006, at 7:29 PM, Frank Moda III wrote:
Hi, I recently got interested in starting to learn ruby. Since then I have done a few things. I have installed the newest ruby (1.8.4) to my /usr/local/bin/ . I also learned about TextMate, so I went and downloaded it. I played around with it and noticed that i could run the ruby script within textmate using Run Script. However, when I do this, i get two errors. One is /bin/ bash: line 3: cat: command not found. This is at the beginning. After it says program exited normally, it says /bin/bash: line 8: rm: command not found. Also, it doesn't show any of the script as having run normally (didn't output anything). Does anyone know whats wrong? Thanks!
Looks like your script is executed as a shell script instead of a ruby script. What is the first line in the script? What is the language setting for the document (should be appearing at the bottom of the window.) Also try to run the "run script" command from the Ruby bundle, instead of using its shortcut.
Haris
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Hi Frank,
Ok. I just opened Textmate and hit File -> New From Template -> Ruby -> Ruby Script. This opened a new file with some predefined commenting at the top. I simply put in puts "Hello World!" to test. I went to bundles -> ruby -> run script and I get a blue box. At the top i still have the missing cat command. Then in a light blue box it says it ran RubyMate r3391 running Ruby v1.8.4 and ran my untitled document. In another light blue box, it says Program Exited normally. At the end it shows the missing rm command error. At the bottome of the document it shows I am using the Ruby language setting.
I'm just guessing here (and sorry if what follows makes you roll your eyeballs with contempt!), but maybe you've reset your PATH variable so as to include /usr/local/bin (and hence the new ruby version), but exclude the usual directories? Check any PATH setting line in your bash startup files (.bashrc, .bash_login, or .profile); make sure it's not setting the PATH to simply /usr/local/bin, but instead reads something like
export PATH="/usr/local/bin:${PATH}"
Best of luck, Paul
Thanks! I thought I had that in there (and I did) but i had it mispelled. I had export PATH="usr/local/bin:/usr/local/sbin:/usr/ local/mysql/bin$PATH". I missed the : between bin and $PATH. Now it works great.
On Jul 28, 2006, at 6:38 AM, Paul McCann wrote:
Hi Frank,
Ok. I just opened Textmate and hit File -> New From Template -> Ruby -> Ruby Script. This opened a new file with some predefined commenting at the top. I simply put in puts "Hello World!" to test. I went to bundles -> ruby -> run script and I get a blue box. At the top i still have the missing cat command. Then in a light blue box it says it ran RubyMate r3391 running Ruby v1.8.4 and ran my untitled document. In another light blue box, it says Program Exited normally. At the end it shows the missing rm command error. At the bottome of the document it shows I am using the Ruby language setting.
I'm just guessing here (and sorry if what follows makes you roll your eyeballs with contempt!), but maybe you've reset your PATH variable so as to include /usr/local/bin (and hence the new ruby version), but exclude the usual directories? Check any PATH setting line in your bash startup files (.bashrc, .bash_login, or .profile); make sure it's not setting the PATH to simply /usr/ local/bin, but instead reads something like
export PATH="/usr/local/bin:${PATH}"
Best of luck, Paul
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
I managed to get this error once, but re-running the command worked fine. I never did figure out what caused the strange error in the first place.
On Fri, 28 Jul 2006, Frank Moda III wrote:
Ok. I just opened Textmate and hit File -> New From Template -> Ruby -> Ruby Script. This opened a new file with some predefined commenting at the top. I simply put in puts "Hello World!" to test. I went to bundles -> ruby -> run script and I get a blue box. At the top i still have the missing cat command. Then in a light blue box it says it ran RubyMate r3391 running Ruby v1.8.4 and ran my untitled document. In another light blue box, it says Program Exited normally. At the end it shows the missing rm command error. At the bottome of the document it shows I am using the Ruby language setting.
On Jul 27, 2006, at 11:16 PM, Charilaos Skiadas wrote:
On Jul 27, 2006, at 7:29 PM, Frank Moda III wrote:
Hi, I recently got interested in starting to learn ruby. Since then I have done a few things. I have installed the newest ruby (1.8.4) to my /usr/local/bin/ . I also learned about TextMate, so I went and downloaded it. I played around with it and noticed that i could run the ruby script within textmate using Run Script. However, when I do this, i get two errors. One is /bin/bash: line 3: cat: command not found. This is at the beginning. After it says program exited normally, it says /bin/bash: line 8: rm: command not found. Also, it doesn't show any of the script as having run normally (didn't output anything). Does anyone know whats wrong? Thanks!
Looks like your script is executed as a shell script instead of a ruby script. What is the first line in the script? What is the language setting for the document (should be appearing at the bottom of the window.) Also try to run the "run script" command from the Ruby bundle, instead of using its shortcut.
Haris