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?
By default, Sublime Text will automatically show the completions popup when a user is editing source code or markup, but not within prose in comments, strings or markups. Pressing the Esc key will hide the completions popup. To manually show the completions popup, press Ctrl+Space.
If you want to kick it up a notch, the Sublime CodeIntel plugin is probably the closest thing to intelli-sense that we have for Sublime Text w/ Ruby, supporting: Jump to Symbol Definition - Jump to the file and line of the definition of a symbol.
It's an old CodeIntel bug: http://bugs.activestate.com/show_bug.cgi?id=72335
Seems that nobody is going to fix it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With