TextMate, rvm and TM_RUBY

In the TextMate RVM instructions in the text that he says to install TM_RUBYin /Users/wayne/.rvm/bin/textmate_rubyand in the image , it shows that it is set to rvm-auto-ruby. I decided to install it in rvm-auto-ruby, thinking that it would use the default RVM for Ruby.

When you run Command Rin RSpec.bundle with TM_RUBYinstalled on rvm-auto-ruby, you will get a loading error . When you install it on textmate_ruby, it will work.

The only problem here is that TextMate does not always use the default version of Ruby, as it is hard-coded in this file.

/Users/jspooner/.rvm/bin/textmate_ruby:

#!/usr/bin/env bash

if [[ -s "/Users/jspooner/.rvm/environments/ruby-1.9.2-head" ]] ; then
  source "/Users/jspooner/.rvm/environments/ruby-1.9.2-head"
  exec ruby "$@"
else
  echo "ERROR: Missing RVM environment file: '/Users/jspooner/.rvm/environments/ruby-1.9.2-head'" >&2
  exit 1
fi

So, two questions:

  • What should do TM_RUBY=rvm-auto-ruby?
  • , TextMate RVM ?
+5
2

, , Rspec TextMate rvm.


, : RVM/Textmate .rvmrc.

~/.rvm/bin/textmate_ruby . , :

  • cd ~/.rvm/bin
  • mv textmate_ruby old.textmate_ruby
  • script textmate_ruby , -, :

    !/usr/bin/env sh

    source ~/.rvm/scripts/rvm cd . exec ruby "$@"
  • chmod +x textmate_ruby

, , Ruby (1.8.7), CMD + R script TextMate:

puts RUBY_VERSION

script CMD + CNTRL + SHIFT + E 1.9.2.

script Ruby 1.9.2, , , . , TextMate RVM Ruby; , RVM: rvm use 1.9.2 --default. , , Ruby TextMate , --default.

, , script 2 .

+7

TM_RUBY your-path/rvm-auto-ruby

http://rvm.io/integration/textmate/

gemset, .rvmrc, , rvm . , . rvm

rvm get head

Textmate. , .

+10

All Articles