What is the best way to setup Textmate 2 to use rbenv?
I read a Textmate mailing list thread about setting up rbenv but haven't found the right solution yet.
Update your ~/.tm_properties
to include:
TM_RUBY = "$HOME/.rbenv/shims/ruby" PATH = "$HOME/.rbenv/bin:$PATH"
Thanks to uberfork for this helpful article: Integrate rbenv with Textmate.
The answers supplied here didn't work for me. Here's what did:
PATH
: $HOME/.rbenv/bin:$HOME/.rbenv/shims:
TM_RUBY
to this: $HOME/.rbenv/shims/ruby
RBENV_VERSION
with your version. example: 2.1.0-preview1
For me adding /usr/local/var/rbenv/shims
to TextMate's PATH
variable did the trick.
PATH
TextMate variable looks like this /usr/local/var/rbenv/shims:$PATH:/opt/local/bin:/usr/local/bin:/usr/texbin
.
Just to supplement all answers above - if you would like to use different ruby version per project just create a new .tm_properites
file inside root of the project with the correct RBENV_VERSION
variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With