Skip to content

Latest commit

 

History

History
106 lines (72 loc) · 2.3 KB

README.md

File metadata and controls

106 lines (72 loc) · 2.3 KB

Development Environment Setup

Prerequisites

To setup the application you will need:

  • PostgreSQL database
  • Ruby 1.9.3-p448
  • Bundler gem
  • Bower
  • Imagick

PostgreSQL installation

Linux

sudo apt-get -y install postgresql

Mac OS X

Install PostgreSQL 9 on OSX

Ruby Installation

Rbenv

To install ruby, it is necessary to have rbenv installed. This can be installed following the steps described in rbenv's Github Repository, in the Installation Section.

Ruby 1.9.3-p448

When rbenv is already installed, go to the project's root folder, and run the following command

rbenv install

Bundler gem

In order the manage the project dependencies, it is necessary to have installed bundler.

gem install bundler

Bower

To manage the client-side js dependencies, it is necessary to have installed bower. Bower depends on node.js, so if it is not installed yet, install it with nvm, following these instructions: NVM - Installation guide.

Having node.js installed, run the following command to install bower:

npm install -g bower

Imagick

Linux:

sudo apt-get install libdjvulibre-dev libjpeg-dev libtiff-dev libwmf-dev libmagickcore-dev libmagickwand-dev libmagick++-dev

On OS X:

brew install imagemagick

Development environment

Before running the app, the following steps should be performed.

  • Create the database user for the application
  • Install the application dependencies
  • Create the database
  • Download the client-side dependecies

Create the database user for the application

createuser -P -s ideo

Assign the word ideo as password too.

Linux users should run the above command as postgres user (sudo su postgres).

Install the application dependencies

bundle install

Create the database

bundle exec rake db:setup

Download the client-side dependencies

bower install

Run the application locally

With all the prerequisites and the development environment ready. Just run the app, with the following command:

bundle exec rails s