Main menu:

Creating a Managed Ruby on Rails Project (DRAFT)

Draft

Create a rails project under SVN source control and TRAC management on SuSE Linux 10.0.

Account Configurtion

$ edit ~/.subversion/config
### Set use-commit-times to make checkout/update/switch/revert
### put last-committed timestamps on every file touched.
use-commit-times = yes

Creating a Rails Project

$ telnet example.com

Create the project

$ cd src
$ rails test
$ vi config/database.yml
$ mysqladmin -u root -p create database_development
$ mysql -u root -p mysql
mysql> grant all on database_development.* to 'user'@'localhost' [identified by 'passwd'];
mysql> exit

Create Subversion Repository

Note: /etc/sysconfig/svnserve has read only (-R) option set by default. Remove this option.

$ su -l
$ mkdir /srv/svn
$ groupadd svn
$ useradd svn -r -d /srv/svn -s /bin/false -g svn
$ svnadmin create /srv/svn/repos
$ chown -Rf svn:svn /srv/svn
$ chmod -Rf 775 /srv/svn
$ vi /etc/sysconfig/svnserve
SVNSERVE_OPTIONS="-d -r /srv/svn/repos"
$ vi /srv/svn/repos/conf/svnserve.conf
[general]
anon-access = none
auth-access = write
password-db = passwd
realm = My Repository
$ vi /srv/svn/repos/conf/passwd
[users]
username = password
$ /etc/rc.d/svnserve start
Starting svnserve

YaST Control Center
Enable subversion server. Action will also enable subversion server on boot.

  • System -> System Services (Runlevel)
  • svnserve
  • Enable
  • Finish

Access Subversion Repository

Verify repository from the client workstation.

$ svn ls svn://example.com
Authentication realm: My Repository
Password for 'username':
$

Import project into repository

$ cd ~
$ mkdir temp
$ mkdir temp/test
$ cp -Rp ~/src/test ~/temp/test/trunk
$ mkdir ~/temp/test/branches
$ mkdir ~/temp/test/tags
$ cd ~/temp
$ svn import --username user --password pass -m "New Import" test svn://example.com/test

Archive the original

$ cd ~/src
$ tar -zcvf test.tar test
$ mv test test.orig

Checkout the project

$ svn co svn://example.com/test

Trac Configuration

trac_ini: repository_dir = /srv/svn/repos/test
trac_admin: test resync

Connect the project to a Trac project

$ sudo trac-admin /www/servers/projects/test initenv

Project name: test
Database connection string: [default]
Repository Type: svn
Path to Repository: /srv/svn/repos/test
Template Directory: [default]

$ sudo chown -R wwwrun:www /www/servers/projects/test

Browse http://example.com/projects/test

$ cd ~/src
$ svn co svn://localhost/test/trunk test

Write a comment





 
 

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a