2.9. Summary

Source control is critical to the functioning of a successful software team, and the overwhelming majority of public Rails projects use a tool called Subversion to manage their code repository. Subversion enables multiple developers to freely work on the same files, manages conflicts, and ensures that any save point in the life of the system can be recreated.

After a Subversion repository is created, your Rails project can be added to the repository, although certain files, such as log files, should be set to be explicitly ignored. It's easy to save your changes back to the repository frequently. If one of the files you changed has been updated by another developer, you'll be required to issue an svn update command to see the changes. Subversion tries to merge the two changes, but if both of you were working on the same part of the file, there may be conflicts that need to be manually resolved. After you have committed your code, other developers can see it by performing their own updates.

Subversion includes a program called svnserve that enables you to easily set up a server that is available to your entire team.

Subversion is the easiest (but not the only) way to keep your project aligned with the latest Rails code, known as Edge Rails.

Get Professional Ruby on Rails™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.