From DreamHost
Jump to: navigation, search
DreamHost does not directly support any of the features described on this page and is not responsible for keeping this content updated or accurate. Use at your own risk!
There may be additional information on the talk page.
The instructions provided in this article or section are considered advanced.

You are expected to be knowledgeable in the UNIX shell.
Support for these instructions is not available from DreamHost tech support.
Server changes performed by DreamHost may break your modifications. You, as the user, are responsible for troubleshooting and resolving issues with your customizations.

The instructions provided in this article or section require shell access unless otherwise stated.

You can use the PuTTY client on Windows, or SSH on UNIX and UNIX-like systems such as Linux or Mac OS X.
Your account must be configured for shell access in the Control Panel.
More information may be available on the article's talk page.

This article describes how to install Redmine, an integrated Wiki and Issue Tracker with support for Subversion and Git. Version >= 0.9 is assumed.

Note: The most up-to-date instructions on how to install Redmine are available here. You may just want to follow those instructions once you get Ruby on Rails set up on a subdomain and a MySQL database created. (If you're on shared hosting, don't run the WEBrick test server mentioned in the directions; it's against Dreamhost's policy.)

For help on using the shell you can take a look at the UNIX commands and you can also get help on changing directories. If you want to save the output for debugging and support then you can look at the Redirection Symbol.

Initial installation

This details installation of Redmine 2.0 using FCGI (see also Use FCGI and NOT Passenger since Dreamhost's current Passenger version is out of date. (May 19 2012 Passenger is currently v2.2.9, which was released in Jan 2010).

Create a new subdomain and a new MySQL database

  1. From the Dreamhost control panel, create a new subdomain for Redmine such as (If you're attempting to install Redmine anywhere other than the subdomain root, you'll also need to follow some additional steps or else you will start receiving routing errors as you continue through these setup instructions.)
  2. Do NOT enable Passenger. Dreamhost's Passenger version is old and buggy. Use FCGI instead of Passenger - make sure the PHP mode dropdown says PHP x.y.z FastCGI.
  3. Specify your web directory: /home/username/ You must add public. It is the actual web interface; additional code is contained in parent and sibling folders. Note that if you are planning to use an svn checkout of redmine, you do not need to create the /public directory as it is a part of the repository and has additional files under it.
  4. From the Dreamhost control panel create a new MySQL database named yourdatabasename.

Get the Redmine source code

ssh into your Dreamhost account and run

cd ~/
hg clone --updaterev 2.0-stable redmine-2.0

Check for the latest version. Note, however, that the default Ruby on a DreamHost VPS is 1.8.7, which (according to means you are constrained to version 2.6 at most. (Simply replace both "2.0" entries with "2.6" from the above, or subsequent, commands.) The following command will tell you what Ruby version you are running:

ruby --version

Alternative download methods

There are a few alternatives to using mercurial to get the source code.

  • Use svn to download and update the source code to t
svn checkout redmine-2.0
  • As another alternative, if you don't want to be able to update Redmine, you can do
svn export --force svn:// redmine-2.0
  • Or manually unpack a source tarball from Rubyforge
tar -zxvf redmine-2.0.3.tar.gz

Configure the Redmine installation

  • Create the database.yml file
cd ~/
cp database.yml.example database.yml
  • Edit database.yml with a text editor. Change the production stanza to your settings (be careful to preserve the whitespace):
  adapter: mysql
  database: your_redmine_database_name
  host: your_dreamhost_mysql_hostname
  username: your_dreamhost_mysql_username
  password: your_dreamhost_mysql_passsword
  encoding: utf8
  • Install gems, run rake, etc. as per the official installation instructions.

Configure the FCGI dispatcher

Per Stack Overflow you may need to add back environment variables in the dispatcher in order to get your Rails app to start loading properly on Dreamhost shared hosting. Add the following lines below the shebang in /public/dispatch.fcgi (copy from the example if there isn't one there yet):

ENV['RAILS_ENV'] = 'production'
ENV['HOME'] ||= `echo ~`.strip
ENV['GEM_HOME'] = File.expand_path('~/.gems')
ENV['GEM_PATH'] = File.expand_path('~/.gems') + ":" + '/usr/lib/ruby/gems/1.8'

You can also copy the .htaccess example in the /public directory if you want to use Redmine's 404.html or 500.html pages. Or start from an example like the one referenced in this thread.

Configuring a repository

When a new project is made you will probably link a repository to it. Our Redmine setup is on a Dreamhost PS account. This should work on a shared account but YMMV.

Go to the project. Then settings -> repository -> Create. Choose the repository type and enter its full local path. For example, for git:


It is important to tell Redmine to look for new repositories. Execute this line:

 ruby /home/username/ "Repository.fetch_changesets" -e  production

Change production for any environment you made.

Configuring email


Edited from Matt Jones' Blog

The easiest way to send email on a Dreamhost PS account is just to use sendmail. cp config/email.yml.example config/email.yml Edit email.yml, look for the section marked “=== Sendmail command” and uncomment the following lines so it looks like this:

# === Sendmail command
   delivery_method: :sendmail

Be sure to comment out any other "production" sections that may appear after this section.

GMail/Google Apps

Configure Redmine to use GMail/Google Apps

Restart Passenger

After changing the e-mail settings don't forget to restart Passenger by adding the file restart.txt to the tmp folder.

  • Change directory (cd) to the root of the redmine install and issue the following command to restart the redmine application.
touch tmp/restart.txt

How to Fix Redmine if Dreamhost Upgrades to a Newer Version of Rails

Sometimes Dreamhost upgrades Rails (or doesn't upgrade it fast enough to keep up with new versions of Redmine), which can break Redmine since it is fairly particular about rails versions -- the 0.9.x codebase expects rails 2.3.5, for example. Dreamhost upgraded several servers to Rails 2.2.2 on 1/5/09, breaking several Redmine instances. In the user discussion that followed this event, one helpful Dreamhost customer shared the following steps for re-installing Rails 2.0.2 and "freezing" Redmine so that it will continue using the old version, even if Dreamhost upgrades Rails again in the future. The following steps have been updated to show how to install rails 2.3.5. (Note: the original discussion can be viewed at

  1. Remove old Rails installations (these overcome the "the rack(0.3.0 not >= 0.9.0)" error.):
     rm -fR /home/YOUR_DOMAIN/.gem
     rm -fR /home/YOUR_DOMAIN/REDMINE_DIR/vendor/rails
  2. Edit REDMINE_DIR/config/environment.rb and ensure it has the following lines:
     RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
     ENV['GEM_PATH'] = '/home/YOUR_DOMAIN/.gem:/usr/lib/ruby/gems/1.8'
  3. Navigate to your Redmine directory and install ROR v2.3.5 (highest version of Rails supported by Redmine):
     gem install -v=2.3.5 rails
     Note: You will probably get 2 WARNINGs - we have taken these into account in step 2.
  4. Freeze your Redmine to use 2.3.5 and nothing else:
     rake rails:freeze:edge TAG=rel_2-3-5
     IMPORTANT: Do NOT type “rake rails:freeze:gems” - this breaks it again. Also, I did not need to run “rake rails:update”.
  5. Replace REDMINE_DIR/config/boot.rb with REDMINE_DIR/vendor/rails/railties/environments/boot.rb. This overcomes the “undefined method 'install_gem_spec_stubs' for #)” error.

Note: You may experience a small delay (up to an hour?) before Redmine starts working again.

WARNING: rake rails:freeze:edge TAG=rel_2-3-5 no long works! --Ericvh 10:22, 20 December 2010 (PST)

To get by the problem with "rake rails:freeze..." timing out use the following from the REDMINE_DIR:

git clone --branch=2-3-stable git:// rails
cd rails
git checkout v2.3.5

Update: In December 2010, Dreamhost upgraded Rails to version 3.0.3, which broke many installations of Redmine.

Instructions for fixing have been provided by paulorcf on the VPIData blog:

1. $ rake VERSION=2.3.5 rails:freeze:gems
2. $ cd vendor/rails/activesupport/lib/active_support/
3. $ vim vendor.rb
4. Edit line 24 ( )
  gem 'i18n', '>= 0.1.3', '< 0.4.0'
5. $ cd -
6. $ rm -rf tmp/restart.txt
7. $ touch tmp/restart.txt

Fixing the problems in browsing a Mercurial repository

If you use Mercurial as your repository in Redmine and self compiled your own Mercurial in your home directory, you might be getting a 500 error whenever trying to browse the repository. The problem is merely that Redmine does not find your Mercurial Binary and your Python library. To solve the issue, please do the following modifications:

In newer versions of Redmine simply:

  1. cp config/configuration.yml.example config/configuration.yml
  2. nano config/configuration.yml
  3. Look for the line containing "scm_mercurial_command", and add the path to your Mercurial binary.

Or for older versions:

  1. Open ~/<your-redmine-domain>/config/environment.rb
  2. Add ENV["PYTHONPATH"] = '/<your-home-directory>/lib/python'
  3. Save the file and close
  4. Open ~/<your-redmine-domain/lib/redmine/scm/adapters/mercurial_adapter.rb
  5. Modify the line that says HGBIN to the following: HGBIN = '/<your-home-directory>/bin/hg'
  6. Save the file and close
  7. Restart the Application
    1. Create a file at: ~/<your-redmine-domain>/tmp/restart.txt with empty contents
    2. If such a file already exits, just update it using: touch ~/<your-redmine-domain>/tmp/restart.txt
  8. Now Browse your site and you'll see everything working fine.

Alternative Packages


Mantis is a PHP bug tracker