Dienstag, 20. Mai 2008

setting up svn with a rails 2.0.2 project

more or less got this from here.

Go to the directory you want to set up the rails project in.


useraccount> mkdir svn_setup
useraccount> cd svn_setup
useraccount> rails project_name -d mysql
useraccount> mv project_name trunk
useraccount> mkdir tags
useraccount> mkdir branches
useraccount> cd trunk
useraccount> rm -r tmp/*
useraccount> rm -r log/*
useraccount> mv config/database.yml database_example.yml
useraccount> cd ..
useraccount> svn import . url_of_svn_repository_space_on_assembla -m "initial repository import" --user name_of_assembla_user

now the project should be in the svn repository in assembla

now checkout the project from the repository in assembla to your localhost

useraccount> cd
useraccount> svn co url_of_svn_repository_space_on_assembla/trunk project_name

project_name is now what you can work on and thus you can get rid of the svn_setup folder you made earlier.

useraccount> rm -r svn_setup

now for the last bits and bobs.

useraccount> cd project_name
useraccount> cp /config/database_example.yml database.yml

useraccount> svn propset svn:ignore database.yml config/
useraccount> svn propset svn:ignore "*" log/
useraccount> svn propset svn:ignore "*" tmp/

Keine Kommentare: