This is how I got GetBundles to work with rvm.
- Open the Bundle Editor (Bundles -> Bundle Editor -> Show Bundle Editor).
- Find GetBundles and select the Get Bundles command.
- Paste the following to the text area.
#!/bin/bash | |
if [ `echo -n "$DIALOG" | tail -c 1` != "2" ]; then | |
CHECK=$("$DIALOG" -l | egrep -c 'TextMate — GetBundles') | |
else | |
CHECK=$("$DIALOG" nib --list | egrep -c 'TextMate — GetBundles') | |
fi | |
[[ ! -d ~/Library/Logs ]] && mkdir -p ~/Library/Logs | |
rm -f ~/Library/Logs/TextMateGetBundles.log | |
if [ $CHECK == 0 ]; then | |
# All I changed was add the call to rvm here | |
# You might need to be more specific with your ruby version; | |
# I have 1.8.7-p203 | |
~/.rvm/bin/rvm 1.8.7 ruby -wKU "'$TM_BUNDLE_SUPPORT/getBundles.rb'" &>~/Library/Logs/TextMateGetBundles.log & | |
else | |
ERR=$(cat <<-AS | iconv -f UTF-8 -t MACROMAN | osascript -- 2>&1 1>/dev/null | |
tell application "TextMate" to activate | |
tell application "System Events" to tell process "TextMate" to tell menu bar 1 to tell menu bar item "Window" to tell menu "Window" to click menu item "TextMate — GetBundles" | |
AS | |
) | |
[[ ! -z $ERR ]] && echo "GetBundles is already running" | |
fi |
FYI, I had to use "
/.rvm/rubies/ruby-1.8.7-head/bin/ruby" instead of "/.rvm/bin/rvm 1.8.7" with rvm 1.6.20.