Skip to content

Instantly share code, notes, and snippets.

@mpapis
Forked from mwlang/after_use_textmate
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpapis/9692935 to your computer and use it in GitHub Desktop.
Save mpapis/9692935 to your computer and use it in GitHub Desktop.
#!/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:-${GEM_HOME##*/}} textmate
unset TM_WRAPPING
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment