Getting Textmate to recognize Ruby version upgrade

若如初见. 提交于 2020-01-13 14:11:17

问题


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].

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.


回答1:


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

I believe you mean "What is the easiest way for me to instruct Textmate to use the newer version of 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

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.




回答2:


Why not just create a .bash_profile file in your home directory?



来源:https://stackoverflow.com/questions/3427501/getting-textmate-to-recognize-ruby-version-upgrade

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!