[TxMt] TM2 with rbenv

14 views
Skip to first unread message

姜 源

unread,
Feb 20, 2012, 10:51:58 PM2/20/12
to text...@lists.macromates.com

I find this url to use rbenv in textmate, 


but it doesn't work for textmate2

Anyone knows how to config rbenv to with with textmate2 ?

Allan Odgaard

unread,
Feb 25, 2012, 8:59:00 PM2/25/12
to TextMate users
On 21/02/2012, at 10.51, 姜 源 wrote:

> I find this url to use rbenv in textmate,
>
> http://uberfork.com/post/12280974742/integrate-rbenv-with-textmate
>
> but it doesn't work for textmate2

I don’t see anything there which wouldn’t also apply to TextMAte 2.

While I would suggest putting the variables in .tm_properties (which also allow easy project-specific ruby version), using the global variables should also work.

> Anyone knows how to config rbenv to with with textmate2 ?

Perhaps you can give some details on which problem you ran into (and how you set it up)?


_______________________________________________
textmate mailing list
text...@lists.macromates.com
http://lists.macromates.com/listinfo/textmate

姜 源

unread,
Feb 27, 2012, 11:05:25 AM2/27/12
to TextMate users
Thanks for your reply, here is my configuration of .tm_properties

TM_RUBY=/Users/jiangyuan/.rbenv/shims/rbenv-auto-ruby
RBENV_VERSION=1.9.3-p125

When I run the demo script via Command + R, Textmate2 just uses system default ruby 1.8.7, while when I run the script in Terminal, it can use  rbenv's ruby 1.9.3

Chris Wong

unread,
Feb 27, 2012, 7:45:25 PM2/27/12
to TextMate users
You need space around TM_RUBY
--
Chris

h.rb.jpg

姜 源

unread,
Feb 27, 2012, 11:15:54 PM2/27/12
to TextMate users
I changed it as you described, but it doesn't work for me

 TM_RUBY = /Users/jiangyuan/.rbenv/shims/rbenv-auto-ruby
 RBENV_VERSION = 1.9.3-p125


在 2012-2-28,上午8:45, Chris Wong 写道:

You need space around TM_RUBY

On Monday, February 27, 2012, 姜 源 wrote:
Thanks for your reply, here is my configuration of .tm_properties

TM_RUBY=/Users/jiangyuan/.rbenv/shims/rbenv-auto-ruby
RBENV_VERSION=1.9.3-p125

When I run the demo script via Command + R, Textmate2 just uses system default ruby 1.8.7, while when I run the script in Terminal, it can use  rbenv's ruby 1.9.3

<h.rb.jpg>


在 2012-2-26,上午9:59, Allan Odgaard 写道:

On 21/02/2012, at 10.51,  姜 源 wrote:

I find this url to use rbenv in textmate,

http://uberfork.com/post/12280974742/integrate-rbenv-with-textmate

but it doesn't work for textmate2

I don’t see anything there which wouldn’t also apply to TextMAte 2.

While I would suggest putting the variables in .tm_properties (which also allow easy project-specific ruby version), using the global variables should also work.

Anyone knows how to config rbenv to with with textmate2 ?

Perhaps you can give some details on which problem you ran into (and how you set it up)?


_______________________________________________
textmate mailing list
text...@lists.macromates.com
http://lists.macromates.com/listinfo/textmate

Chris Wong

unread,
Feb 28, 2012, 11:43:38 AM2/28/12
to TextMate users
I have the following in my ~/.tm_properties file.

TM_RUBY = "$HOME/.rbenv/shims/ruby"
PATH = "$PATH:/usr/local/bin"

Note the PATH setting.  If you have rbenv installed via Home Brew, you'd need to add /usr/local/bin to PATH.

Chris

2012/2/27 姜 源 <slee...@gmail.com>



--
Chris

姜 源

unread,
Feb 28, 2012, 9:27:57 PM2/28/12
to TextMate users
Thanks for your help, this doesn't works for me either.
I've already can see the TM_RUBY value changed, but when I run Command + R
It still runs the script with the system's default ruby

Chris Wong

unread,
Feb 28, 2012, 11:10:39 PM2/28/12
to TextMate users
Get rid of the #! at the beginning of your buffer.  It's pointing to the system ruby.

Chris

2012/2/28 姜 源 <slee...@gmail.com>



--
Chris

姜 源

unread,
Feb 29, 2012, 12:54:21 AM2/29/12
to TextMate users
Thanks, it works. 
Reply all
Reply to author
Forward
0 new messages