29 Apr 08 Trouble with Trac
from Christopher in BlogTorials, DevelopmentI ran across two annoying problems when setting up a new Trac project on our xserve today. Thought I’d share my solutions in hopes of helping someone. Our xserve runs OS X Server 10.4.11, and we’re using Trac version 0.11b2.
Problem #1: How can I set up two Trac repositories running on the same Trac server?
The answer to this one was easier than I thought. Normally you would point tracd right to a single project like this (the $> represents your command line prompt):
$> tracd --port 8000 /path/to/your/environment/ProjectOne
If you have multiple projects, you need to give tracd the path directly to the environment along with the -e flag like this:
$> tracd --port 8000 -e /path/to/your/environment/
Simpler than I thought. After searching all over Google I found that solution right from Trac’s built-in command line help ($> tracd –help).
Problem #2: When I create a new Trac environment I get the message “Warning: Can’t synchronize with the repository (/path/to/my\ files/ProjectTwo does not appear to be a Subversion repository.)
Again, a massive Google search returned no good answers, but the solution was actually simple. All I had to do was edit the trac.ini file (line 156) to remove the \ (backslash) character from the path name. So I changed the line from:
repository_dir = /path/to/my\ files/ProjectTwo
to:
repository_dir = /path/to/my files/ProjectTwo
Fixed! You don’t even need to restart Trac if you’re using tracd, the built in server.
How did that extra backslash get in there anyways? Well, when you set up a new Trac project ($> trac-admin /path/to/myproject initenv) you will be prompted for several setup options including the file path to the new trac project. If you’re on OSX like me, you’re used to adding a backslash to directory names that contain spaces. As far as I know, Trac needs those backslashes to create the new project directory and files, but then it adds that same path to the trac.ini file, including the backslash. I don’t know if this is a bug… I’m just glad Trac is working now!









