Skip to content

Instantly share code, notes, and snippets.

@schowdhury
Created July 12, 2011 16:16
Show Gist options
  • Save schowdhury/1078327 to your computer and use it in GitHub Desktop.
Save schowdhury/1078327 to your computer and use it in GitHub Desktop.
Using textmate with rvm
#generate a wrapper script for a textmate_ruby - you can call it whatever you like but
#textmate_ruby is clear
rvm wrapper ruby-1.9.2@rails3 textmate
# this will generate a textmate_ruby command for you
# problem with the above is, it's not going use your project specific gemset and ruby
# to do that, edit the file and change the contents to what's below
vi `which textmate_ruby`
#---------- New content --------
#!/usr/bin/env bash
source ~/.rvm/scripts/rvm
cd .
exec ruby "$@"
#-------------------------------
# set the TM_RUBY textmate environment variable to point to the output of
# which textmate_ruby
# restart textmate. have fun
@schowdhury
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment