Hi Sean,
In my experience, there really isn't a good way to separate chunks of
code among developers, especially when they're working in a team
environment (pair programming, etc.). Speaking from a decade of
experience, it causes many more problems than it solves.
I understand you want to protect your intellectual property - that's
cool. However, being TOO restrictive of it is going to make things
much harder for your staff and really kill progress. Most developers
I know wouldn't even take the job to begin with if encrypting part of
the codebase during development, or splitting it up was part of the
deal. Anyone who does is, in my opinion, probably not experienced
enough to really know what's going on, and therefore, probably not
experienced enough to really build something -right-.
That said, here are two other options for you. You could possibly
implement both:
1) Create a web service based architecture, having one developer be
responsible for that, and a series of "client" applications that
connect to the web service. This works great in environments where
you have disparate technologies that need to communicate regardless of
what language they're built in, or what servers they're on. It's a
solid "technology agnostic" approach because all the other developers
would need to do is interface over HTTP for each "request" to build
their portions of the application.
2) Have your developers sign an NDA. Legally speaking, as long as
your NDA is sound, IF they go off and try to steal your IP, you'll
have the necessary proof of a bad faith effort and/or breach of
contract that you'd need to win in court. Even though you may not be
able to get a huge chunk 'o change from each individual up front if
you win, you might be able to take in a portion of their earnings in
the future. I'm not a lawyer, but I strongly recommend getting a GOOD
one who knows IP law and has experience creating/administering solid
NDA's and IP agreements, as well as a good track record for winning
cases against real IP thieves.
At the end of the day, you really can't feasibly expect a developer to
build any application - Rails-based or otherwise - without access to
the codebase. It just plain doesn't work.
Good luck man! Hope things work out for you.