XAMPP + Retrospectiva on Windows 7

Wow! Finally I got it to work… that took me about 6 hours…. in hope to save someones time, I will write down step-by-step, what I did.

We will set up Retrospectiva on xampp under http://localhost/retrospectiva .

You will need to do several steps including installation of XAMPP, Rails, many missing *.gem’s and of course Retrospectiva. Then you need to set up a mongrel-service and Apache-proxy configuration. After that, you should be able to enjoy Retrospectiva! 🙂

This is how I got it to work:

STEP 1 – Install XAMPP

http://www.apachefriends.org/xampp.html
I installed it in D:\xampp.

STEP 2 – Install Rails

We’re going to use the RubyInstaller from http://rubyforge.org/.
I first tried it with Rails 1.9.1 but it won’t work for me. I found that I might use 1.8.7:
http://rubyforge.org/frs/?group_id=167&release_id=42563
So, you might install 1.8.7: rubyinstaller-1.8.7-p249-rc2.exe
Be sure to add the ruby/bin to your PATH (you’re able to check that option during the installation).

I installed it in D:\xampp\ruby.

cmd:
cd D:\xampp\ruby\bin
gem update
gem install rails --include-dependencies

That takes some time…

STEP 3 – Install Mongrel

I used mongrel 1.1.5.

cmd:
gem install mongrel

STEP 4 – Install mysql gem

I used mysql gem 2.8.1. :

cmd:
gem install mysql

(their might be some definition-errors, but that should be ok)

You need to download an older MySQL client library. The suggested one from the Retrospectiva-Wiki, which I used, can be found there: http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/libmySQL.dll.

Copy the file to D:\xampp\ruby\bin.

STEP 5 – Install mongrel-service + win32-service gems

  1. Download “mongrel_service-0.3.4-i386-mswin32.gem” from http://rubyforge.org/frs/?group_id=1306
  2. Download “win32-service-0.5.2-mswin32.gem” from http://files.ruby.inoack.com/win32utils/
    Be sure to use 0.5.2 as newer ones may not work with ruby 1.8.7!
  3. Create a directory in htdocs like “gems”: D:\xampp\htdocs\gems and move the two *.gem files to this folder.
  4. Install the gemscmd:
    cd D:\xampp\htdocs\gems
    gem install mongrel_service

STEP 6 – Install Retrospectiva

(You can follow the official Installation-Guide for more details)

Download the latest release: http://github.com/dim/retrospectiva/tarball/master
(I used dim-retrospectiva-b179453.tar.gz)

Unpack the downloaded file and move it to: D:\xampp\htdocs\retrospectiva

Create Database

start the xampp-control and start apache+mysql.
Go to: http://localhost/phpmyadmin and perform the sql-query (change the x’s 😉 )

sql:
CREATE DATABASE IF NOT EXISTS retrospectiva;
GRANT ALL PRIVILEGES ON retrospectiva.*
TO "retrospectiva"@"localhost" IDENTIFIED BY "xxxxxxxxxxx";

Configure Database

Rename D:\xampp\htdocs\retrospectiva\config\templates\database.mysql.yml
to D:\xampp\htdocs\retrospectiva\config\database.yml

Edit config/database.yml with a text editor and adjust the configuration details in the production section. That will mainly be the password.

Load initial content and install missing gems

Try to setup Retrospectiva…

cmd:
cd D:\xampp\htdocs\retrospectiva
rake RAILS_ENV=production db:setup

That probably fails with errors about missing gems.
Go through the list of the missing gems and install each BUT NOT RedCloth:

cmd:
gem install MISSING_GEM

We need to download the RedCloth*.gem manually because on windows the installation will fail caused by missing compilers/make.exe/etc.. don’t try to fix that.. that’s not worth the time.
Download RedCloth-4.2.2-x86-mswin32-60 from http://rubyforge.org/frs/?group_id=216&release_id=36337

Put the downloaded file in the folder you already used in Step 5 D:\xampp\htdocs\gems and install the gem:

cmd:
gem install RedCloth-4.2.2-x86-mswin32-60.gem

Testing Retrospectiva installation

After installing all that gem’s you might want to test the installation with the built-in webrick-server:

cmd:
cd D:\xampp\htdocs\retrospectiva
ruby script/server -e production -p3000

That takes some time… and their might be some errors, but after a while you should see Retrospectiva at http://localhost:3000

Well, fine! But we want it to work with the apache from XAMPP! This needs some more steps…
Hit ctrl+c to stop the webrick server and read on! 🙂

STEP 7 – Configure Apache and customize Retrospectiva

First create a file D:\xampp\htdocs\retrospectiva\config\runtime\custom.rb with this content to inform retrospectiva that we use an other root-url than “/”:

[code]
ActionController::Base.relative_url_root = "/retrospectiva"

Now we’ll configure the apache to proxy the retrospectiva calls to mongrel (we will install mongrel services in the next step).

Open D:\xampp\apache\conf\httpd.conf and add at the bottom:

[code]
Include conf/httpd-proxy-mongrel.conf

Create the file we just included: D:\xampp\apache\conf\httpd-proxy-mongrel.conf
with the content:

[code]
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
ProxyPass /retrospectiva balancer://retrospectiva_cluster
ProxyPassReverse /retrospectiva balancer://retrospectiva_cluster
<Proxy balancer://retrospectiva_cluster>
BalancerMember http://127.0.0.1:3002
</Proxy>

STEP 8 – Install Mongrel

Open a comand-window as Administrator (Windows->cmd, but instead of hitting ENTER hit CTRL+SHIFT+ENTER, or just right-click cmd.exe and choose Run as Administrator).

Go to the retrospectica folder and install services (it’s important that you perform the install in that folder!):

cmd:
cd D:\xampp\htdocs\retrospectiva
mongrel_rails service::install -N mongrel_retrospectiva_3001 -D "Mongrel serving Retrospectiva on 3001" -p 3001 -e production -c D:\xampp\htdocs\retrospectiva

now start the service:

cmd:
net start mongrel_retrospectiva_3001

cmd:
services.msc /s

-> find “Mongrel serving Retrospectiva on 3001” service and right click, select Properties and set Startup type to “Automatic”. Press OK.

STEP 9 – Start! 🙂

Wow that was a long way to go… but if everything works fine, you only need to restart apache in the xampp-control (hit stop then start button).

Now go to http://localhost/retrospectiva and login (admin/password)!

DONE! 🙂

I hope you could save some time and that it work’s for you!

References

As I did not reinvent the wheel, here are the pages, that I used to find out how this works (or at least some of them.. don’t remember everything..):

This entry was posted in Software Engineering and tagged , , , , . Bookmark the permalink.

5 Responses to XAMPP + Retrospectiva on Windows 7

  1. Huviel says:

    Hi,

    I’m having trouble to install Retrospectiva. When i run this command “rake RAILS_ENV=production db:setup”, i got this message

    “retrospectiva already exists
    rake aborted
    no such file to load — retrospectiva/extension_manager/controller/retrospectiva_extension_assests_controller”

    Did you ever have this problem ?

    Thx by advance.

  2. Robert Heim says:

    No, I did not encounter this. Do you have an other installation of retrospectiva?

  3. Huviel says:

    No :/

    I tried to do an other installation by deleting all my files and uninstall ruby, but when I run the command “gem install rails –include-dependencies” I’ve got this message
    “Error installing rails: bundler requires RubyGems version >= 1.3.6”

    I’ll try to find out where does that come from 🙁

    Thx for responding that quickly anyway 🙂

  4. Huviel says:

    Re,

    I’m sorry I can’t edit my latest post so I create a new one.

    So, I ran this command “gem update –system” to get RubyGems 1.6.0. I hope I won’t have any problems with this version.

    I keep you in touch, just in case…

    😉

Leave a Reply

Your email address will not be published. Required fields are marked *