I have this Java script runner installed in my gedit external tools:

#!/bin/sh
cd $GEDIT_CURRENT_DOCUMENT_DIR
if javac $GEDIT_CURRENT_DOCUMENT_NAME;
then
java ${GEDIT_CURRENT_DOCUMENT_NAME%\.java}
else
echo "Failed to compile"
fi

I tried modifying to it to something like this

#!/bin/sh
cd $GEDIT_CURRENT_DOCUMENT_DIR
ruby ${GEDIT_CURRENT_DOCUMENT_NAME%\.rb}

but it doesn't work. I may have missed something, I don't know what because I don't do bash scripting. Hehe

link|improve this question
did you test this in the terminal? – steabert Mar 28 '11 at 8:10
feedback

1 Answer

up vote 2 down vote accepted

Hy, I used this and this works fine (I'm using ruby1.9.1 on my ubuntu)

#!/bin/sh
cd $GEDIT_CURRENT_DOCUMENT_DIR
ruby1.9.1 $GEDIT_CURRENT_DOCUMENT_NAME

Good luck.

link|improve this answer
it works. thanks :) – Ygam Mar 29 '11 at 0:51
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.