Installation prerequisites

The source code to Insoshi is managed via Git, a version control system developed by Linus Torvalds to host the Linux kernel.

Get Git

The first step is to install Git. Linux and Mac users should have no problems; Windows users might have to install Cygwin first.

For more detailed information, check out our guide for Installing Git under the Git Guides.

Set up your local Git repository

The Git Guides also detail our recommended setup for your local repository:

Clone of the official repository
(git://github.com/insoshi/insoshi.git)

Your GitHub fork added as a remote repository

Local tracking branches for official 'master' and 'edge' branches

Local development branch based off 'edge' and pushed to your GitHub fork

A shell script is available to automate this repository configuration. It is run from the command-line as follows:

$ configure_insoshi_local.sh [GitHub Account Name]

Install libraries and gems

There are several library and gem dependencies needed to run Insoshi.

Libraries

You'll need to install FreeImage or some other image processor (such as ImageMagick/RMagick) and a database (MySQL or PostgreSQL). Install instructions for these are easy to find using Google. (If you're installing FreeImage on Windows, this blog post might be helpful.)

To use Insoshi's search capability, you also need Sphinx. Follow the instructions to install Sphinx for your platform. When running Insoshi in a production envinronment, you should also set up a cron job to rotate the search index as described here. This currently works only with MySQL due to a bug in Ultrasphinx.

The search specs detect whether the search daemon is running and weren't performed during the first test run. An initial test run is needed in order to populate the test database for indexing (search specs would fail on an empty database).

To shut down the Ultrasphinx daemon for test

$ rake ultrasphinx:daemon:stop RAILS_ENV#test

Loading sample data

Now load the sample data

$ rake db:sample_data:reload

configure and start the Ultrasphinx daemon for the development runtime