[TxMt] Re: Ruby Auto Complete Not working?

Ole Begemann ole at oleb.net
Fri Mar 9 17:39:51 UTC 2007


> > > 1.  Make a brand new Rails project:  rails test
> > > 2.  Edit database.yml so it can hook up to a development database.  I
> > > just used sqlite3.
> > > 3.  ruby script/generate model just_one
> > > 4.  Open then new model file and put the caret in the class  
> > > definition
> > > 5.  Type val (or validate if you prefer, I checked both) and trigger
> > > rcodetools completion
> > >
> > > Note that I *did not* have Rails vendored here and this worked just
> > > fine.
> > >
> > > Does this much work for you?
> >
> > Nope. Got the "No matches were found" tooltip.  :(
> 
> Interesting.  Maybe it has trouble with some architectures or (more  
> likely) Ruby environments and has nothing to do with Rails projects.
> 
> Sadly, I have to admit that I am about out of good ideas now.
> 
> I guess the next step would be to see if you can get rcodetools to  
> work outside of TextMate...

In my case, it definitely only works if Rails is frozen in /vendor/rails. I
created the fresh project as above and also got the "No matches were found"
tooltip. After rake rails:freeze:gems everything works great.

Looking at the code in the Bundle editor, I noticed one thing at the beginning
of the Rails detection code:

dir = File.dirname(ENV["TM_FILE_PATH"]) rescue ENV["TM_PROJECT_DIRECTORY"]

Isn't the name of the variable TM_FILEPATH (no 2nd underscore)? But changing
this does not change anything on my machine.

Ole




More information about the textmate mailing list