简体   繁体   English

配置Komodo Edit以通过RVM使用正确的Ruby版本

[英]Configure Komodo Edit to use correct Ruby version via RVM

I want to use Komodo Edit 8 as my editor for my Ruby-on-Rails projects and I also use different versions of Ruby and Rails managed by RVM. 我想将Komodo Edit 8用作我的Ruby-on-Rails项目的编辑器,并且还使用由RVM管理的不同版本的Ruby和Rails。 I want Komodo Edit to automatically use the correct versions for its code-intelligence and syntax checking. 我希望Komodo Edit为其代码智能和语法检查自动使用正确的版本。

So does anyone have experience using RVM together with Komodo Edit 8? 那么,有没有人有将RVM与Komodo Edit 8一起使用的经验? I don't think giving Komodo a absolute path to a Ruby version works in this scenario? 在这种情况下,我不认为为Komodo提供通往Ruby版本的绝对路径是可行的吗?

Any help would be appreciated, since I've spend almost 2 hours googling about this issue but didn't find a acceptable answer. 由于我已经花了将近2个小时的时间来研究这个问题,但没有找到可接受的答案,因此可以提供任何帮助。

I think you can point to ~/.rvm/bin/rvm-auto-ruby . 我认为您可以指向~/.rvm/bin/rvm-auto-ruby From the RVM site's page about TextMate integration : 在RVM网站上有关TextMate集成的页面上

The rvm-auto-ruby approach rvm-auto-ruby方法

Out of the box, rvm ships with a ruby binary, typically in ~/.rvm/bin (or, in system wide installs, inside of /usr/local/bin), that will perform the following steps before executing ruby: rvm开箱即用,随附一个ruby二进制文件,通常在〜/ .rvm / bin中(或在系统范围内的安装中,在/ usr / local / bin内部),它将在执行ruby之前执行以下步骤:

  Load up RVM Look for any RVMRC files and load them Execute as a normal ruby 

This approach makes it possible to have the ruby switched on a per-project basis without any extra work. 这种方法可以在每个项目的基础上切换红宝石,而无需任何额外的工作。 With rvm installed, this is a matter of taking the full path to rvm-auto-ruby, found via: 安装了rvm之后,就可以通过rvm-auto-ruby获取完整路径,该路径可通过以下方式找到:

  which rvm-auto-ruby 

Take the time to go over RVM's site and become familiar with what information is there. 花些时间浏览RVM的站点并熟悉那里的信息。 That site is the best and most accurate information for using RVM. 该站点是使用RVM的最佳,最准确的信息。 On the installation page , they say this about external tutorials for installing RVM, which applies to pretty much anything you want to know about RVM: 安装页面上 ,他们说了有关安装RVM的外部教程的内容,该教程几乎适用于您想了解的有关RVM的所有内容:

Note that that any outside tutorials are NOT supported whether they work or not. 请注意,不支持任何外部教程,无论它们是否有效。 Tutorials are great, however we have spent massive amounts of man hours debugging the installation process. 教程很棒,但是我们花费了大量的工时调试安装过程。 Please use the install process(es) from this site only, as this is the only supported installation types and methods. 请仅使用此站点上的安装过程,因为这是唯一受支持的安装类型和方法。

In other words, even if you found information via an internet search, what you found could very possibly be wrong so go to RVM's site and see what you find. 换句话说,即使您是通过Internet搜索找到信息的,您发现的内容也很可能是错误的,因此请转到RVM的站点并查看发现的内容。 If nothing shows up, contact the authors as they are the best source of truth. 如果没有任何反应,请联系作者,因为他们是最好的真理来源。


I want to use Komodo Edit 8 as my editor for my Ruby-on-Rails projects and I also use different versions of Ruby and Rails managed by RVM. 我想将Komodo Edit 8用作我的Ruby-on-Rails项目的编辑器,并且还使用由RVM管理的不同版本的Ruby和Rails。 I want Komodo Edit to automatically use the correct versions for its code-intelligence and syntax checking. 我希望Komodo Edit为其代码智能和语法检查自动使用正确的版本。

Look at RVM's " Typical RVM Project Workflow " page for information on how RVM can autoswitch your Ruby version and gem sets. 查看RVM的“ 典型RVM项目工作流程 ”页面,以获取有关RVM如何自动切换Ruby版本和gem集的信息。 It's not really for Komodo to do, it's RVM that handles that heavy-lifting. 实际上,这不是Komodo要做的,而是RVM处理繁重的工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM