2

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

  • did you test this in the terminal? – steabert Mar 28 '11 at 8:10
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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