# Configuring Textmate for Ruby 1.9.1

**URL:** <https://www.ruby-forum.com/t/configuring-textmate-for-ruby-1-9-1/173643>\
**Category:** Ruby\
**Created:** [August 12, 2009, 4:41pm UTC](https://www.ruby-forum.com/t/configuring-textmate-for-ruby-1-9-1/173643 "2009-08-12T16:41:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![exile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/50afbb/32.png) [@exile](https://www.ruby-forum.com/u/exile)\
**Post date:** [August 12, 2009, 4:41pm UTC](https://www.ruby-forum.com/t/configuring-textmate-for-ruby-1-9-1/173643/1 "2009-08-12T16:41:06Z")

</div>

I had just installed Ruby 1.9.1 using MacPorts, but TextMate still  
interprets Ruby 1.8.6.

I had gone into my Shell Variables under preferences and set the  
following:

Variable: TM\_RUBY  
Path: ./opt/local/bin/ruby1.9 (install location of my Ruby 1.9.1  
install).

I ran a program, it ran on Ruby 1.9.1. I un-checked the Shell Variable  
preference; it ran on Ruby 1.8.6. I checked the setting and re-ran, got  
a “Command Error at line 6” pointing to some file in /tmp.

Is this configured properly? If so, what’s wrong?

If it’s not, what’s the proper configuration?

---

<div class="post-metadata">

**Author:** ![exile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/50afbb/32.png) [@exile](https://www.ruby-forum.com/u/exile)\
**Post date:** [August 12, 2009, 5:21pm UTC](https://www.ruby-forum.com/t/configuring-textmate-for-ruby-1-9-1/173643/2 "2009-08-12T17:21:28Z")

</div>

On Aug 12, 2009, at 9:41 AM, Mike A. wrote:

> I ran a program, it ran on Ruby 1.9.1. I un-checked the Shell Variable  
> preference; it ran on Ruby 1.8.6. I checked the setting and re-ran,  
> got  
> a “Command Error at line 6” pointing to some file in /tmp.

I just ran through these steps and everything worked fine for me.

The error you show comes from where TextMate first invokes TM\_RUBY.  
Are you sure you just checked and un-checked the box? If you edited  
the contents, you may have made it invalid with an extra quote or  
something. Just a thought.

> Is this configured properly? If so, what’s wrong?
> 
> If it’s not, what’s the proper configuration?

You are doing it right, yes.

James Edward G. II

---

<div class="post-metadata">

**Author:** ![exile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/50afbb/32.png) [@exile](https://www.ruby-forum.com/u/exile)\
**Post date:** [August 12, 2009, 5:26pm UTC](https://www.ruby-forum.com/t/configuring-textmate-for-ruby-1-9-1/173643/3 "2009-08-12T17:26:07Z")

</div>

After the error appeared, I had edited the directory location, taking  
out the ./ at the start. The error still appeared (though it seemed to  
point to a different file in /tmp). I changed it back, same error  
(again, different file in /tmp).

Should I just re-create the shell variable?

---

<div class="post-metadata">

**Author:** ![exile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/50afbb/32.png) [@exile](https://www.ruby-forum.com/u/exile)\
**Post date:** [August 12, 2009, 5:34pm UTC](https://www.ruby-forum.com/t/configuring-textmate-for-ruby-1-9-1/173643/4 "2009-08-12T17:34:35Z")

</div>

Actually, no. I’m at work now (on a PC) and the Mac’s at home.

James G. wrote:

> On Aug 12, 2009, at 10:26 AM, Mike A. wrote:
> 
> > After the error appeared, I had edited the directory location, taking  
> > out the ./ at the start. The error still appeared (though it seemed to  
> > point to a different file in /tmp). I changed it back, same error  
> > (again, different file in /tmp).
> > 
> > Should I just re-create the shell variable?
> 
> Can you show me the contents that variable holds now, while it’s  
> failing?
> 
> James Edward G. II

---

<div class="post-metadata">

**Author:** ![exile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/50afbb/32.png) [@exile](https://www.ruby-forum.com/u/exile)\
**Post date:** [August 12, 2009, 6:00pm UTC](https://www.ruby-forum.com/t/configuring-textmate-for-ruby-1-9-1/173643/5 "2009-08-12T18:00:06Z")

</div>

On Aug 12, 2009, at 10:34 AM, Mike A. wrote:

> Actually, no. I’m at work now (on a PC) and the Mac’s at home.

Tonight, or whenever it’s convenient, is fine. 🙂

James Edward G. II

---

<div class="post-metadata">

**Author:** ![exile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/50afbb/32.png) [@exile](https://www.ruby-forum.com/u/exile)\
**Post date:** [August 13, 2009, 2:50am UTC](https://www.ruby-forum.com/t/configuring-textmate-for-ruby-1-9-1/173643/6 "2009-08-13T02:50:04Z")

</div>

Alright, here’s the error I (still) get:

/tmp/temp\_textmate.dLXXwJ: line 6: : command not found

My setting is as follows:

Variable: TM\_RUBY  
Value: ./opt/local/bin/ruby1.9

---

<div class="post-metadata">

**Author:** ![exile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/50afbb/32.png) [@exile](https://www.ruby-forum.com/u/exile)\
**Post date:** [August 12, 2009, 5:32pm UTC](https://www.ruby-forum.com/t/configuring-textmate-for-ruby-1-9-1/173643/7 "2009-08-12T17:32:36Z")

</div>

On Aug 12, 2009, at 10:26 AM, Mike A. wrote:

> After the error appeared, I had edited the directory location, taking  
> out the ./ at the start. The error still appeared (though it seemed to  
> point to a different file in /tmp). I changed it back, same error  
> (again, different file in /tmp).
> 
> Should I just re-create the shell variable?

Can you show me the contents that variable holds now, while it’s  
failing?

James Edward G. II

---

<div class="post-metadata">

**Author:** ![exile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/50afbb/32.png) [@exile](https://www.ruby-forum.com/u/exile)\
**Post date:** [August 13, 2009, 3:45am UTC](https://www.ruby-forum.com/t/configuring-textmate-for-ruby-1-9-1/173643/8 "2009-08-13T03:45:28Z")

</div>

On Aug 12, 2009, at 7:50 PM, Mike A. wrote:

> Alright, here’s the error I (still) get:
> 
> /tmp/temp\_textmate.dLXXwJ: line 6: : command not found
> 
> My setting is as follows:
> 
> Variable: TM\_RUBY  
> Value: ./opt/local/bin/ruby1.9

. in a Unix path means “current directory” and that’s not what you  
meant here. Try removing it and I suspect it will work just fine.

James Edward G. II

---

<div class="post-metadata">

**Author:** ![exile](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/50afbb/32.png) [@exile](https://www.ruby-forum.com/u/exile)\
**Post date:** [August 13, 2009, 4:05am UTC](https://www.ruby-forum.com/t/configuring-textmate-for-ruby-1-9-1/173643/9 "2009-08-13T04:05:45Z")

</div>

That worked. Thanks James.
