Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I ran the following from my top level Ruby on Rails directory.

find . -name "*.rb" | etags -

Then within Emacs I visited that tag file. This works reasonably well to find some of the methods and most of the files, however it is having trouble finding some of the extra methods/classes that I use in my helpers directory.

For example, I have a file in my helpers directory called my_foo_helper.rb If I search my tags for that file, it finds it. However, if I try to find a tag for one of the methods within that module it doesn't find it at all.

If I use Aptana or something like that it seems to be able to locate those methods.

How can I resolve this problem?

share|improve this question

3 Answers 3

Have you checked rtags?

rtags is a Ruby replacement for ctags - allowing for name navigation in source code using vim, emacs and others.

Also look at this Emacs ruby-mode posting.

share|improve this answer

I use a number of ruby/rails specific plugins for vim.

Being the behemoth that emacs is, I presume there would be similar. The plugins I use actually process the code (Rather than grepping it) giving it a better awareness of such a dynamic language, which leaves my editor better able to work out what I'm looking for.

share|improve this answer

etags still doesn't deal nicely with ruby. On OSX though there is a simple solution, see: http://www.murphybytes.com/2012/06/28/etags-for-ruby-in-emacs-on-a-mac/

share|improve this answer
1  
Welcome to Super User. Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. –  daxlerod Jun 27 '13 at 17:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.