Last active
December 17, 2015 22:19
-
-
Save mwlang/5681232 to your computer and use it in GitHub Desktop.
TextMate hook that will switch Textmate's ruby versions automatically when rvm switches ruby versions....see http://www.christopherirish.com/2010/06/28/how-to-setup-textmate-to-use-rvm/ for background -- this script simpy automates the rvm wrapper ${RUBY_VERSION} textmate call described in the blog post.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Automatically sets the wrappers for textmate's use | |
# Based on article posted: http://www.christopherirish.com/2010/06/28/how-to-setup-textmate-to-use-rvm/ | |
# Set up the TM_RUBY shell variable as described and remove the Builder as described and restart TextMate | |
# | |
# Make this script executable and you should be good to go! TextMate will stay in sync with rvm, which | |
# generally means the last project folder you switched into from terminal shell. | |
# | |
if [[ $TM_WRAPPING != "1" ]]; then | |
export TM_WRAPPING="1" | |
rvm wrapper ${RUBY_VERSION} textmate | |
unset TM_WRAPPING | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment