views:

92

answers:

1

I am new to ruby development. Up until this point, I've done only small project that easily fit in one's head (and in one or two files). Now, I've got a big project (it's a GUI for a database task scheduler) that I need to make changes to. There are many files (879 to be precise) and I need a better way to get to know what's where.

So what is a good way to search for all other instances of a particular variable or function? Specifically, is there a tool that can help me quickly jump from one file to another, finding where @logs (for example) is being accessed?

My work computer is a Mac, which so far I like, but I'm still learning what tools are out there for it.

+1  A: 

Start in the app/controllers ... its not technically where execution starts, but for a beginner its a good start. Check out Ryan Bates videos and/or buy Agile Web Development with Rails

all rails apps have the same directory structure, so by learning the app you will learn rails. get Notepad++(free) or TextMate. make sure to get Explorer plugin for Notepad++ so you can see your entire app in the editor.

you can also examine config/routes.rb for interesting url-to-action links

avguchenko
Yeah, I've been randomly poking around in those folders, but using just VIM and bash, finding what I'm looking for is hard. I will check out those videos.
David Oneill
make sure to get Explorer plugin for Notepad++ so you can see your entire app in the editor.
avguchenko
If you are a vim user, the defacto is to use the awesome rails.vim: http://www.vim.org/scripts/script.php?script_id=1567. No need to switch editor: vim is what I use, and very popular among Rails developers.
hgimenez
@avguchenko: Is there a way I can get notepad++ running on my Mac?
David Oneill
if you're on MacOS you should get TextMate. it costs money, but very well worth it.
avguchenko
http://davidbaumgold.com/tutorials/wine-mac/ FTW
David Oneill