I am trying to launch terminal from Sublime Text 2 which would than run Ruby file (via Build System). Reason I am not using built in ruby build system is that my ruby script takes input, which does not work in sublime output panel.
Does anybody have build system which does this?
OK, You could create a file ruby.sh (for example in your home folder):
/home/your/home/ruby.sh
#!/bin/sh
/usr/bin/xterm -e /bin/sh -c "/path/to/ruby $1; exec /bin/sh" &
Create a new Sublime build file:
{
"cmd": ["/home/your/home/ruby.sh", "$file"]
}
Now when you press CTRL-B your ruby.sh should be executed, and that executes ruby with your current buffer/file. It opens xterm as a new window (tested).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With