Search code examples
ruby-on-railsrubyconfigurationrvmkomodoedit

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. I want Komodo Edit to automatically use the correct versions for its code-intelligence and syntax checking.

So does anyone have experience using RVM together with Komodo Edit 8? I don't think giving Komodo a absolute path to a Ruby version works in this scenario?

Any help would be appreciated, since I've spend almost 2 hours googling about this issue but didn't find a acceptable answer.


Solution

  • I think you can point to ~/.rvm/bin/rvm-auto-ruby. From the RVM site's page about TextMate integration:

    The rvm-auto-ruby approach

    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:

        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:

        which rvm-auto-ruby
    

    Take the time to go over RVM's site and become familiar with what information is there. That site is the best and most accurate information for using 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:

    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. 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. I want Komodo Edit to automatically use the correct versions for its code-intelligence and syntax checking.

    Look at RVM's "Typical RVM Project Workflow" page for information on how RVM can autoswitch your Ruby version and gem sets. It's not really for Komodo to do, it's RVM that handles that heavy-lifting.