Skip to content
Bernardo da Costa Santos edited this page Aug 21, 2013 · 46 revisions

Welcome to the SAPOS Wiki and Documentation.

Setup

This is a simple and fast guide to correctly set the environment to get you going with our plataform, so you can develop and contribute.

Remember that this guide will help you to set a development environment. The production environment setup requires a little more care. Its guide will come soon.

You shall move on to others guides and/or tutorials, if you want to know the features of our plataform, as soon as you finish this guide.

With no futher delay, let us proceed!

Requirements

To make this tutorial quick, we'll assume that you already have Ruby 1.9.3 installed on your machine.

Make sure you're using Ruby's correct version.

With that said, we can proceed smoothly. :)

Configuration

First of all, clone the project by opening the terminal:

$ git clone [email protected]:gems-uff/sapos.git

Then, as the most of Ruby projects, right after creating a new Rails project, we'll execute:

$ bundle install --without staging production

This command will analise the file Gemfile.lock and install the dependencies of the project. The flag --without just tell what environment(s) shall not have its dependencies installed.

We are almost there! We need, now, to make Rails generate the database stuff and, then, we are ready to go.

To do that, execute the following command on terminal:

$ rake db:setup

The rake db:setup will create the database of the current environment, creating the tables and columns in it, and then run the db/seed.rb file.

With this, the database should be successfully generated, and you should be ready to go!

Execute the following line on your terminal:

rails server

This will start a server at a default port (which is, generally, 3000), allowing you to access your web aplication.

Then, all you have to do now is access localhost:3000, sign in using [email protected] user and admin password, and enjoy the application.

Reminder: Go to Configurations and change the email and password of the user [email protected] after signing in.