Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

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

1 Answer 1

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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