ruby - Using RVM with different gemsets in TextMate -
i have set rvm , made individual gemsets projects per rvm best practices. running test file in textmate dosen't work , have read here do. problem won't work because guide expects me have 1 gemset (they call "rails3"). have 2-3 projects open @ time (using different gemsets) can't use approach.
have of solved problem?
i've found rvm wrappers method buggy, , you've discovered doesn't work @ gemsets unless lot of tedious setup.
i've had success using following script tm_ruby
:
#!/bin/bash base_dir=${tm_project_directory:-$pwd} cd $base_dir exec $my_ruby_home/bin/ruby $*
as long you're in textmate project , have .rvmrc
file in project root run code in ruby version , gemset specified in .rvmrc
. cd
makes sure rvm discovers .rvmrc
.
put code above ~/bin/textmate_ruby_wrapper
, go preferences > advanced > shell variables , set tm_ruby
same path.
Comments
Post a Comment