- loading...
Validate and Save your Ruby in TextMate – with secret Rubinus superpowers
In some TextMate bundles, if you save a file it will also validate the file and show any syntax errors in a tooltip. This is awesome. (e.g. JavaScript and CoffeeScript)
So I added the same thing to my Ruby.tmbundle. Install this, save a dodgy Ruby file and you’ll now see something like:

Rubinius superpowers
Do you think the following syntax error tooltip is more useful?

Yes it lovely, and the new Ruby.tmbundle will automatically do this if it can find rbx in your TextMate’s $PATH. Yeah yeah.
If you have Homebrew installed:
brew install rubinius
Then in TextMate, add your homebrew bin folder to the $PATH.
- Go to TextMate’s Preferences (Cmd+,)
- Go to “Advanced”, then “Shell Variables”
- Edit the
PATHvariable, and add “:/path/to/homebrew/bin”
For example, if you have homebrew installed in ~/.homebrew then you might add :/Users/drnic/.homebrew/bin
. My complete $PATH in TextMate is:
/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/bin:/usr/local/bin/:/Users/drnic/.homebrew/bin
Save a dodgy Ruby file and see the beautifully helpful syntax message.
Install Ruby.tmbundle
To install via Git:
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/drnic/ruby-tmbundle.git "Ruby.tmbundle"
osascript -e 'tell app "TextMate" to reload bundles'