Introduction
I know there are plenty of other tutorials around about installation of redmine on Windows but it turns out that most of them are outdated or didn't work for my environment.
Why redmine ?
Last month I made a survey about Project Management Software (or Project Collaboration Software as I prefer) and found out that redmine is the best way to go. It has some unique features like multiple project support, advanced extensibility, many useful plugins and above all a great community around it. If you want to play with it just go to demo.redmine.org.
Other Ways to Install
If you are good with mysql and a fresh svn install you may go with the bitnami redmine stack. It wasn't the case for me since I already have VisualSvn installed and I prefer postgresql over mysql.
Errors I Hope You Won't Encounter
Numerous rake aborted! errors. One of them was RubyGem version error: rack(1.1.0 not ~> 1.0.1), and other one was Invalid argument!
Also this one: Error installing mongrel_service: ERROR: Failed to build gem native extension.
I managed to get rid of those, if you stick to the steps below you will avoid them.
Step 1 - Install Postgresql
You can install postgresql by using the stand alone installer from postgresql website.
There is also another option called Postgres Plus Installer. It will install postgresql and keep it up-to-date if you want so. Download and run the installer. Choose only the following options "Database Server", "pgBouncer", and "pgAgent". In the next page check "Database Installation Tuning". If you want to keep your postgres updated check the "Update Notification Service". You will need a free account with EnterpriseDB for that. After the installation begins you will be asked to check for updates.
After setup finishes open pgAdmin and create a database called redmine.
Step 2 - Install Ruby
Download and install RubyInstaller for version 1.8.x. NOT the 1.9x one. redmine is only compatible with 1.8.x branch. Also check the option that will add ruby bin folder to command prompt path.
Step 3 - Install Rails and Postgres Gems
Run the following commands:
gem install rails -v=2.3.5
gem install postgres-pr
Step 4 - Download and Configure redmind
Download the latest stable version of redmine and extract it to a folder of your choice. Open config/database.yml file and edit the production configuration like this:
production:
adapter: postgresql
database: redmine
host: localhost
username: postgres
password: xxx
encoding: utf8
Run the following commands:
set RAILS_ENV=production
rake generate_session_store
rake db:migrate
rake redmine:load_default_data
Step 5 - Create a Windows Service
After running the following commands you will get a windows service named "redmine". You may set it to autostart.
gem install mongrel --include-dependencies
gem install mongrel_service --include-dependencies --platform=mswin32
mongrel_rails service::install -N redmine -c [PATH-TO-REDMINE] -p [PORT] -e production
Now start the service and navigate to http://localhost:[PORT]. You should see redmine working. Default pass is admin:admin.
Step 6 - Configure redmine smtp for gmail.
I always prefer to use gmail apps for outgoing mails for my applications. Since gmail uses tls for smtp you need some tweaks to make it work for redmine. This
link shows the right way of doing it but unfortunately I couldn't execute the
ruby script/plugin install command So I had to install it manually. From
this link download the two ruby files (action_mailer_tls.rb, smtp_tls.rb) and copy them to lib folder in your redmine install path. Next open config\environments\production.rb file and add the two lines:
require 'smtp_tls'
require 'action_mailer_tls'
Edit your config/email.yml file like below:
production:
delivery_method: :smtp
smtp_settings:
tls: true
address: "smtp.gmail.com"
port: '587'
domain: "smtp.gmail.com"
authentication: :plain
user_name: "your_email@gmail.com"
password: "your_password"
Navigate to http://localhost:[PORT]/settings and click Email Notifications Tab. At the bottom right corner click "Sent a test mail". You should receive one.
Congratulations ! You have a working redmine system now. Please send your corrections and suggestions as comments.