Austin Hyde
Austin Hyde

Reputation: 27446

Getting auto-complete to work with Ruby Gems in Sublime Text 2, with SublimeCodeIntel and RVM

I have been trying (unsuccessfully) all morning to get the SublimeCodeIntel (forked from Komodo's CodeIntel feature) plugin for Sublime Text 2 to auto-complete stuff from installed Ruby Gems, in conjunction with (or without, for that matter) RVM on my Mac. It doesn't seem to have any problems with built in stuff, or even rake for that matter, but it can't seem to pick up any Gems.

With RVM, I installed Ruby 1.9.3, then with a global gemset, installed Mustache:

$ rvm install 1.9.3
$ rvm --default use 1.9.3
$ gem install mustache
$ irb
>> require 'mustache'
=> true

All is good so far. Now I start Sublime, with SublimeCodeIntel installed, and make a file. Typing require ' then CMD+J yields a pop-up, as expected, with available modules / directories. However, mustache isn't one of them. (things like abbrev, base64, and rake are, though)

I check the CodeIntel config, find that it is still using the system ruby, so I switch it:

{
  "Ruby": {
    "ruby": "~/.rvm/bin/default_ruby"
  }
}

Still no dice. I switched back to system ruby, installed mustache there, and tried again, with no luck.

After switching back, I realized that maybe CodeIntel just can't find the file, even though ruby can, so I explicitly added the gem bin directory to the config file:

"rubyExtraPaths":["~/.rvm/gems/ruby-1.9.3-p0/bin"]

And it STILL didn't work.

Now, I'm still a beginner at working with Ruby, Gems, and RVM, so maybe I'm missing something painfully obvious, but I did look through all the documentation I could find on any of it, and didn't find anything.

Does anybody have any idea what may be wrong here?

Upvotes: 7

Views: 4148

Answers (1)

Arenielle
Arenielle

Reputation: 2857

It's an old CodeIntel bug: http://bugs.activestate.com/show_bug.cgi?id=72335

Seems that nobody is going to fix it.

Upvotes: 4

Related Questions