Subversion passwords encrypted with gnome-keyring

# Enable gnome-keyring for your shell. I edited .bash_profile and added the following line:

export `gnome-keyring-daemon`
# I added the following line to .bash_logout as well: kill $GNOME_KEYRING_PID
# I uncommented the following in my home .subversion/config: password-stores = gnome-keyring
# I ran the subversion keyring_tool to create and set a default keyring:
/opt/CollabNet_Subversion/bin/keyring_tool -c svn
/opt/CollabNet_Subversion/bin/keyring_tool -s svn

Install Redmine on CentOS5/RHEL5

Some of these instructions were taken from the following links:

What you will need:

* An Apache server already configured and running as the apache user

* The subversion process setup and the root repository set to /var/svn/repositories

* The virtual hosts DocumentRoot for the Redmine website is located at /var/www/rails/redmine/public

* A MySQL server installed and configured

Install Ruby & RubyGems via RPM

Ruby 1.8.6 is required for all versions of redmine. The current version 1.0.0 which was the current development version from the trunk!!

Download the following rpms from and install them.

  • ruby-
  • ruby-devel
  • ruby-libs
  • ruby-irb
  • ruby-rdoc
  • ruby-mysql-2.7.3-1.el5
  • rubygems-1.3.1-2.el5.kb
  • subversion-ruby-1.4.2-4.el5_3.1

Once downloaded, install them:

  1. rpm -ivh ruby-*.rpm
  2. rpm -ivh rubygems subversion-ruby


You will need to install rubygems-1.3.2 or higher. by default, CentOS5 comes with rubygems-1.3.1 installed. To resolve this issue:

  1. Download rubygems tarball from here: wget
  2. Untar it on the files system anywhere you like: tar xvzf rubygems-1.3.2-tgz
  3. Move to the newly created directory: cd rubygems-1.3.2
  4. Update the rubygems files with 1.3.2 version: ruby setup.rb
  5. If you had gems installed under rubygems 1.3.1 version, they will be gone. You will now need to install the necessary gems for redmine now that rubygems 1.3.2 is installed.

Install Ruby & RubyGems via source

You will need gcc installed to compile this and zlib-devel is also required. In addition for Ruby 1.9.2, gems is installed with Ruby.

  1. Download ruby from here:
  2. Uncompress the file: tar xvzf ruby-X.tar.gz
  3. Move to the ruby directory: cd ruby-X
  4. Select the defaults, it will install into /usr/local/bin and /usr/local/lib by default. ./configure
  5. make
  6. make test
  7. sudo make install

You can verify this worked and ruby and gem is installed by checking the version and listing installed gems.

ruby -v

gem -v

gem list

Install Rails and Rake

You can use gems to install rails and rake.  Make sure to install the correct versions required by Redmine. If you checkout the source from the Redmine repository, you can install a specific Rails version on your machine with:

  1. sudo gem install rails -v=2.3.5
  2. sudo gem install rack -v=1.0.1
  3. sudo gem install mysql

Use yum to get/install the required packages.

$ sudo yum -y install mysql mysql-server mysql-devel ruby-devel

If you have RubyGems installed, you’ll need to get the mysql gem:

$ sudo gem install mysql -- --with-mysql-config=/usr/bin/mysql_config

You can find out your gem environment with: gem env

gem env
RubyGems Environment:
– INSTALLATION DIRECTORY: /usr/lib64/ruby/gems/1.8
– /usr/lib64/ruby/gems/1.8
– /home/dlopez/.gem/ruby/1.8
Install passenger gems: gem install passenger, then run passenger-install-apache2-module. This will create the necessary lines to add to Apache rails.conf file.

Create a database for Redmine

I use MySQL so here all I needed:

  1. bash$ mysql -u root -p
  2. mysql > create database redminedb character set utf8;
  3. mysql > grant all privileges on redminedb.* to rmproduser@localhost identified by “password”;
  4. mysql > flush privileges;
  5. quit

Install & Configure Redmine

  1. I chose to checkout redmine from a subversion repository.  You can get the source code by typing: svn co redmine
  2. Copy the redmine directory to /var/www/rails/: cp -rvp redmine /var/www/rails/
  3. Give apache ownership of the files: cd /var/www/rails ; chown -R apache.apache redmine
  4. Copy the config/database.yml.example to config/database.yml and add the mysql permissions to the config/database.yml file
  5. Copy the config/email.yml.example to config/email.yml and comment the bottom of the file. I uncommented the section that uses localhost sendmail service.
  6. Generate a session store secret. This is required on the trunk version of Redmine. For the checkout above it is required: rake generate_session_store
  7. Create the database structure, tables and an administrator account: RAILS_ENV=production rake db:migrate
  8. Insert default configuration data in database: RAILS_ENV=production rake redmine:load_default_data
  9. Start the redmine web service: ruby script/server -e production -d
  10. Now you should be able to browse to and view the default installation

Install & Configure Subversion

  • yum install mod_dav_svn subversion
  • I found this init script here: Just put it in a file called subversion and place it at /etc/rc.d/init.d/
  • Make sure the script is executable: chmod 755 /etc/rc.d/init.d/subversion
  • Add an option to /etc/sysconfig/subversion to tell subversion where the repositories are located. OPTIONS=’-r /path/to/repos’
  • Add the init script to chkconfig: chkconfig –add subversion
  • Make sure it starts on reboot: chkconfig subversion on
  • Now you can start the subversion service: sudo /sbin/service subversion start
  • Verify it’s running with: ps aux | grep svnserve


/usr/local/lib/ruby/1.8/i686-linux/digest/ undefined symbol:
rb_Digest_MD5_Init - /usr/local/lib/ruby/1.8/i686-linux/digest/

If you get the above error and installed ruby from source, to resolve this I recompiled ruby with a make clean and then reinstalled gems with ruby setup.rb in the rubygems source directory.

ActionView::TemplateError (undefined method `-‘ for nil:NilClass)

I resolved this with the following ruby command:

ruby script/runner -e production ‘Project.rebuild!’

Then restart Apache!

Error: ‘gem_original_require’: no such file to load — zlib (LoadError)

To resolve this issue make sure zlib-devel is installed. *yum install zlib-devel*

then in /opt/ruby/ext/zlib

ruby extconf.rb

make && make install


To install the Global Filter plugin:

git clone

cp -R global_filter_redmine_plugin {RedmineRoot}/vendors/plugins/

Moving Redmine to another server.

#1 Install the current version of Redmine on new server.

#2 MySQL dump the database from the old server and import into the new server.

#3 Run: RAILS_ENV=production rake db:migrate

#4 Reload Apache!

Install WebSVN

* Download it from;jsessionid=24F17B3F5279F7DE3BB39F064A2C4A03

* Extract the archive into any directory within your Apache DocumentRoot

* In the “includes” directory of the extracted WebSVN directory, edit the file and add the following lines:


* Save the file and then rename it to

*Open the URI

Move SVN Repository and Checkout Websites to New Server

I had to move our Subversion repository to a new server and found the following post with instructions on how to move the repository:

* svnadmin dump /path/to/repository > repository-name.dmp

If the dump file is rather large you can compress it with your favorite zip utility. Now you need to get the dump to your new server, so simply transfer the file via FTP, local share, CD, thumbdrive or whatever it takes. Once the dump file is on the new machine and uncompressed, you need to set up and load the new repo by typing:

* cd /path/to/new-repository

* svnadmin create repository-name

* svnadmin load repository-name < repository-name.dmp

A couple of small things to note – the dump file will be rather large as it represents every commit made on your repository. If your repository is rather large and mature, this file could get quite large. Also this method works across platforms so moving from UNIX to Windows or visa-versa is also possible. Now a couple of my websites are live working checkout copies of the repositories so in addition to moving the repositories, I had to do the following to move the websites over too.

1. Edit Apache to be aware of the website Alias and location

2. Move to the location on the server of the website and run a svn checkout command

* cd /path/to/website

* svn checkout file:///path/to/repositories/repo_name

3. Make sure the checkout has the correct permissions

4. Edit the svnserve.conf file to the appropriate permissions settings and add passwords to the passwd file if necessary

5. Re-create the post-commit script and make sure it is executable by svn user

6. Verify post-commit script updates the live website.

* cd (changed to the current users home directory)

* svn checkout file:///path/to/repository/repo_name

7. Edit a file

8. Commit the changes

* svn commit -m “Add Comment Here” repo_name/

9. Browse to the website and make sure the changes you made were reflected.