Skip to content
sarken edited this page Jul 24, 2018 · 6 revisions

Warning: As of 2015, it is no longer possible to run the Archive locally on Windows due to incompatible gems. The recommended procedure on Windows is therefore to use the Vagrant development environment.

Old Instructions

This document assumes that you are comfortable with the Windows command line and starting/stopping services.

Top level process

To install the Archive, you will need to install the following (preferably in this order):

Make sure you know exactly where all these applications are and what ports they use if they are not the ones we’ve listed above.

Installing the Archive

Get the code

  1. Fork the otwcode/otwarchive repo
  2. Clone your forked copy into a folder of your choice on your Windows machine

(If you have already joined the OTW as an official volunteer, you can also follow the "Getting started" instructions on the internal wiki and use Dropbox to synchronise your folder with your Webdev)

Configure the application

The live Archive runs on Unicorn HTTP web servers. However, Unicorn doesn't work on Windows, so you'll have to substitute Thin instead. To do this, simply add the following lines at the end of the Gemfile in the root of otwarchive:

group :mswin do  
    # Windows alternative to unicorn  
    gem "thin"  
end

Note: If you are using RubyMine, you can use the Run command to start the otwarchive app and it will run the web app using WEBrick (though see this StackOverflow post for the solution to a common warning that WEBrick adds to the logs)

Install the application

Make sure that the Ruby executable is in the path, then with otwarchive as your current directory, run the following commands:

bundle install  
bundle exec seed

When it has finished doing all that, then the following command will start up the Thin web service and run the app:

C:\Ruby193\bin\ruby.exe D:/Dropbox/OTW-Projects/otwarchive/script/rails server -b 127.0.0.1 -p 3000 -e development

(Or you can let RubyMine's Run menu magically work it out for you)

Things you might have to fix

Autocomplete

Autocomplete relies on data in Redis. This needs to be loaded whenever it changes; on the production server (“Beta”), this task is automated, but on your Windows installation, you will have to load the data yourself. There is a load_autocomplete_data Rake task in /lib/tasks which takes care of this. Make sure Redis is running as a service, and run the following task:

RAILS_ENV=staging rake autocomplete:load_data

You should be able to see some autocomplete results on your copy of the Archive within a few minutes.