« Advanced Rails Recipes | Main | A New PickAxe »

December 13, 2007

Ruby Importer for Spotlight

Ruby_spotlight_3

I'm feeling really stupid for not discovering this sooner—a Spotlight importer for Ruby source files. Now I can search inside source for methods, classes, and the contents of comments. My only concern so far is the volume of stuff being indexed, but time will tell...


TrackBack

TrackBack URL for this entry:
http://www.typepad.com/t/trackback/2226312/24176270

Listed below are links to weblogs that reference Ruby Importer for Spotlight:

Comments

You'll want to watch out for external drives that you keep backups on (spotlight will index them and you'll start to get duplicate entries showing up in your search) If you want to disable indexing, it's easy enough though with the spotlight metadata util (though the option for this behaviour for removable media SHOULD have been put into the preference panel IMO):

# Turn off indexing
sudo mdutil -i off /Volumes/[Archive Drive]
# Erase existing spotlight data
sudo mdutil -E /Volumes/[Archive Drive]

My coworker had a huge problem with this importer consuming gobs of resources any time he saved a file in textmate. I believe it is PowerPC architecture only.

No PowerPC processes on my Leopard!

Jeremy: Apple seems to have only the 0.1 version, but 0.2 is now a universal binary and claims to have fewer memory issues: http://www.arcadianvisions.com/downloads/RubyImporter.html

I still don't have a Mac (I'm waiting for Christmas or the upcoming Macworld), so I have a stupid question: isn't it possible to just teach Spotlight to index Ruby source files as simple text files? Doesn't it alreay index simple text files? The screenshot shows a lot of metadata... too much for my taste...

Post a comment

If you have a TypeKey or TypePad account, please Sign In

Now in Beta

  • Programming Ruby, 3rd Edition
    Third Edition, Covering Ruby 1.9, now in beta
My Photo

Pragmatic Stuff

Photos

  • www.flickr.com
    This is a Flickr badge showing public photos from pragdave tagged with pragdave_badge. Make your own badge here.

Site Search

  • Google Search

    The web
    PragDave