I'm facing some problems after installing Trac on my Windows 7 Ultimate 64bits using BitNami. The Issues are:
Subversion Control During the installation process, when the BitNami setup asks for the project repository directory, it only accept if you write a path that doesn't exist, otherwise you can't continue. So i got forced to point the path to "C:\Repositories\TRAC" (a new folder) instead of "C:\Repositories\DBG" (where the repository of the project that i was creating really are). So, after the installation, I've changed the trac.ini file at the key
[trac] repository_dir = C:\Repositories\TRAC repository_type = svn
to
[trac]
repository_dir = C:\Repositories\DBG
repository_type = svn
And now, when I login to 开发者_JS百科the DBG project in Trac, it warns:
Warning: Can't synchronize with the repository (The 'repository_dir' has changed, a 'trac-admin resync' operation is needed.). Look in the Trac log for more information.
When I go to cmd the following happens:
C:\Users\Fernando>cd\
C:\>cd C:\Program Files\BitNami Trac Stack\trac\Scripts
C:\Program Files\BitNami Trac Stack\trac\Scripts>trac-admin resync
Welcome to trac-admin 0.11.6
Interactive Trac administration console.
Copyright (c) 2003-2009 Edgewall Software
Type: '?' or 'help' for help on commands.
Trac [C:\Program Files\BitNami Trac Stack\trac\Scripts\resync]> resync
Failed to open environment. [Errno 2] No such file or directory: 'C:\\Program Fi
les\\BitNami Trac Stack\\trac\\Scripts\\resync\\VERSION'
Traceback (most recent call last):
File "c:\program files\bitnami trac stack\trac\lib\site-packages\Trac-0.11.6-p
y2.5.egg\trac\admin\console.py", line 177, in env_open
self.__env = Environment(self.envname)
File "c:\program files\bitnami trac stack\trac\lib\site-packages\Trac-0.11.6-p
y2.5.egg\trac\env.py", line 209, in __init__
self.verify()
File "c:\program files\bitnami trac stack\trac\lib\site-packages\Trac-0.11.6-p
y2.5.egg\trac\env.py", line 277, in verify
fd = open(os.path.join(self.path, 'VERSION'), 'r')
IOError: [Errno 2] No such file or directory: 'C:\\Program Files\\BitNami Trac S
tack\\trac\\Scripts\\resync\\VERSION'
C:\Program Files\BitNami Trac Stack\trac\Scripts>
What it should be?
2-Configuring Logo:
I can't find where to place my project logo to be shown in left-top corner! at the header_logo key: [header_logo]
alt = DBG
height = 50
link = http://localhost:801/trac/DBG
src = ITINT150.png
width = 150
i've placed the ITINT150.png file in the same folder as trac.ini for testing (obviously i wasn't going to leave it there), but trac doesn't find it, looking at the html code of the link tag generated, it points to: src="/trac/DBG/chrome/common/ITINT150.png", but where is this folder located, so i can place the image there?
Thanks in advance!
For the resync, the first argument to trac-admin is the trac environment directory. So run
trac-admin <path-to-trac-environment> resync
As of Trac 0.12, the above command changed to:
trac-admin <path-to-trac-environment> repository resync <repository-name or '*'>
For the logo, set the src to site/ITINT150.png
, and put ITINT150.png
into the <path-to-trac-environment>/htdocs
directory.
I tried @retracile's solution but I received a "Command not found" message from trac-admin. This is what eventually worked for me:
trac-admin </path/to/trac/env> repository resync "*"
That last argument specifies the repository to resync and can be switched with the name of a specific repo (presumably with the quotes intact; I didn't try it) if you don't want to resync all repos. See here for details: http://trac.edgewall.org/wiki/TracAdmin
精彩评论