The book "Rails Cookbook" has a wonderful section on "Getting Your Rails Project into Subversion".
In short, here are the steps:
- Have your svn admin create the project repository for you.
- Check the entire project directory into svn. Then run svn update to check out the project from the repository.
- Remove logfiles from svn and commit:
% svn remove log/*
% svn commit -m 'removed log files'
- instruct Subversion to ignore the logfiles that get recreated by Rails:
% svn propset svn:ignore "*.log" log/
% svn update
% svn commit -m 'svn ignore new log/*.log files'
- Set up Subversion to ignore your database.yml file. Save a version of the original file for future checkouts. Then tell Subversion to ignore the new version of database.yml that you'll create, which includes your database connection information.
% svn move config/database.yml config/database.orig
% svn commit -m 'move database.yml to database.orig'
% svn propset svn:ignore "database.yml" config/
% svn update config
% svn commit -m 'Ignoring database.yml'
I would add, at this point, make an svn copy of the project directory. Then next time when you need to create anther project, you can start by svn copy, and save you about 15 mins in setting up the base. But if you are starting the new project in a newer version of rails, then you may want to consider redo the above steps again, to take advantage any new rails improvement.
Recent comments
2 weeks 3 days ago
27 weeks 4 days ago
28 weeks 3 days ago
39 weeks 3 days ago
40 weeks 5 days ago
49 weeks 3 days ago
49 weeks 5 days ago
50 weeks 4 days ago
51 weeks 3 days ago
51 weeks 4 days ago