≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Bug #1512

Bug #1512: uninitialized constant CommandT::Match

Kind bug
Product Command-T
When Created 3/23/2010, updated 3/24/2010
Status closed
Reporter anonymous
Tags no tags

Description

Using the new version Command-T compiles cleanly on ruby 1.9.1, but at vim startup it prints:

 Error detected while processing /home/archlucas/.vim/plugin/command-t.vim:
 line  151:
 NameError: uninitialized constant CommandT::Match

Changing the :Match and :Matcher lines to read:

 autoload :Match,        'command-t/ext.so'
 autoload :Matcher,      'command-t/ext.so'

Fixes that. (I added the ".so" in both instances)

Comments

  1. Greg Hurrell 3/24/2010

    Thanks for the report.

    I am guessing from the fact that your home directory is a subdirectory of /home/, your VIM runtime files are in ~/.vim/, and your extension compiled with an .so extension, that you probably compiled on some Linux or Linux-like system.

    I'm actually a little surprised that autoloading just ext on its own doesn't work, seeing it picks up the built extension fine on Mac OS X (where it is called ext.bundle).

    Will see if I can dynamically detect the extension at runtime and append it so that you don't need to hand-edit those lines like you did.

  2. Greg Hurrell 3/24/2010

    Just did some local testing here and looks like it's not specific to Linux or anything. I can reproduce on Mac OS X as well with Ruby 1.9.1; seems like without the extension autoload doesn't work, even though require does.

  3. Greg Hurrell 3/24/2010

    Ok, this should be fixed now.

    Rather than messing with autoload strings at runtime (trying to detect platform, dynamically modifying filename string etc) the simplest and most robust solution was to replace use of autoload with good old-fashioned require statements. This should work fine with all versions of Ruby.

    This will be included in the next release, so going to mark as closed.

  4. Greg Hurrell 3/24/2010

    Status changed:

    • From: new
    • To: closed
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets