让Textmate识别Ruby版本升级 [英] Getting Textmate to recognize Ruby version upgrade

查看:72
本文介绍了让Textmate识别Ruby版本升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了 http:中的说明://bparanj.blogspot.com/2010/06/installing-ruby-191-on-snow-leopard.html 即可在运行Snow Leopard的Mac上安装Ruby 1.92版.唯一的偏差是在步骤3中,它要求更新.bash_profile.我的主目录中有.profile,但没有.bash_profile,因此我将导出命令添加到.profile的最后一行.安装成功完成(带有与上述相同的两个警告消息,我也忽略了),因为终端中的Ruby -v打印了

I used the instructions at http://bparanj.blogspot.com/2010/06/installing-ruby-191-on-snow-leopard.html to install Ruby version 1.92 on my Mac running Snow Leopard. The only deviation is in step 3, which calls for .bash_profile to be updated. I have .profile, but not .bash_profile, in my home directory, so I added the export command to the last line of .profile. The installation completed successfully (with the same two warning messages as mentioned, which I too disregarded), as Ruby -v in a terminal prints

ruby 1.9.2dev (2010-07-02 revision 28524) [x86_64-darwin10.4.0].

但是,当我运行Textmate时,cntrl-R会调用Ruby版本1.8.7,就像在1.9.2安装之前一样.在Textmate的Preferences-Advanced-Shell变量中,TM_RUBY设置为/usr/bin/ruby​​. (二进制别名)文件"ruby​​"尚未更新.指示Textmate使用较新版本的Ruby的最简单方法是什么?请注意,我对OS X的了解相对有限.

When I run Textmate, however, cntrl-R invokes Ruby version 1.8.7, as it did before the 1.9.2 installation. In Textmate's Preferences-Advanced-Shell Variables, TM_RUBY is set to /usr/bin/ruby. The (binary alias) file 'ruby' has not been updated. What is the easiest way for me to instruct Textmate to use the newer version of Ruby? Please note my understanding of OS X is relatively limited.

推荐答案

我最简单的方法是 指示Ruby使用较新的版本 Ruby?

What is the easiest way for me to instruct Ruby to use the newer version of Ruby?

我相信您的意思是:指示我的Textmate使用较新版本的Ruby的最简单方法是什么?"

I believe you mean "What is the easiest way for me to instruct Textmate to use the newer version of Ruby?"

假设是这种情况,您是否尝试过编辑TM_RUBY shell变量以指向您新安装的版本?根据您引用的文档,它应该位于/usr/local下的某个位置(很可能是/usr/local/bin/ruby​​).

Assuming that is the case, have you tried to edit the TM_RUBY shell variable to point to your newly installed version? According to the docs you referenced, it should be somewhere under /usr/local (most likely /usr/local/bin/ruby).

您可以通过在终端窗口中键入以下内容来查找红宝石安装的位置:

You can find out the location of your ruby installation by typing the following in your terminal window:

$ which ruby
/usr/local/bin/ruby

然后执行以下操作以验证版本

then perform the following to verify the version

$ ruby -v

一旦您拥有正确的红宝石路径,请在Textmate中,双击TM_RUBY shell变量&的值".键入1.9.2安装的路径.

Once you have the proper ruby path, in Textmate, double-click the 'value' of the TM_RUBY shell variable & type in the path to your 1.9.2 install.

这篇关于让Textmate识别Ruby版本升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆