Kronuz/SublimeCodeIntel — Issue #91: Ruby CodeIntel fails due to AssertionError
Author: gufo
Created: 2012-02-02 16:34:03+00:00
State: open

Here's what I do:

* `rm -rf ~/.codeintel/db`
* Start Sublime Text 2
* Hit command-J

It spends a while scanning, then stops. No code completion. Tailing the log gives this:

```
+ Event: scanning Ruby files in '/Users/janko/work/fenix/app/models'
unexpected error scanning `visitor_context.rb'
Traceback (most recent call last):
File "/Users/janko/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/citadel.py", line 268, in scan
scan_tree = cile_driver.scan_purelang(self)
File "/Users/janko/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/lang_ruby.py", line 1585, in scan_purelang
rubycile.check_insert_rails_env(buf.path, blob_scope)
File "/Users/janko/Library/Application Support/Sublime Text 2/Packages/SublimeCodeIntel/libs/codeintel2/rubycile.py", line 233, in check_insert_rails_env
assert blob_class.get('ilk') == 'class'
AssertionError
Done 'Ruby' CodeIntel! Full CodeIntel took ~10s
```

After a bit of poking around, it looks like `blob_class.get('ilk') # => 'namespace'`.