Skip to content
Primero is an application designed to help child protection workers and social workers in humanitarian and development contexts manage data on vulnerable children and survivors of violence. Please carefully read our LICENSE. If you would access to the CPIMS+ and GBVIMS+ configurations, please contact:
Ruby JavaScript Gherkin HTML CSS Shell
Branch: maint_1.6
Clone or download
Jasser Gutierrez and pnabutovsky Merged in prim-1343-lb-lta-pdf-export-fails (pull request #3779)
PRIM-1343 - LB - PDF export with follow up form fails
Latest commit 66bdc84 Jan 23, 2020
Type Name Latest commit message Commit time
Failed to load latest commit information.
config bump version to v1.6.27 Oct 23, 2019
doc merge changes from 1.4 May 15, 2018
script remove executable perm for asset files Nov 17, 2014
vendor Changed where idle timer is started, added cleanup method, attached t… Nov 13, 2017
.gitignore set up default locales using locales.yml Oct 3, 2018
.ruby-version merged changes from development. resolved conflicts Feb 5, 2018
.travis.yml Merge branch 'maint_1.5' of into PRIM-109… Aug 22, 2019
Rakefile merged changes from branch async_export Aug 12, 2016
Vagrantfile backed out Vagrantfile change May 17, 2018
bitbucket-pipelines.yml Adding maint_1.6 to the managed branches Aug 20, 2018 Changed namespace RapidFTR to Primero Aug 30, 2015


Build Status


To develop the application locally, you will need to do the following:

Note: Primero v1.4+ (currently on the development branch) uses Ubuntu 16.04. Primero v1.3 or below uses Ubuntu 14.04. If you wish to do development on either stream, it's recommended to clone this project into separate directories to manage separate Vagrant boxes.

Once you have Vagrant installed, run the following to install the right plugins:

$ vagrant plugin install vagrant-berkshelf --plugin-version 5.1.2
$ vagrant plugin install vagrant-omnibus --plugin-version 1.5.0

Note: If you are using OS X, make sure to run the following command due to a 1.8.x Vagrant bug

$ sudo rm -f /opt/vagrant/embedded/bin/curl

Duplicate the dev-node.json.sample and rename it dev-node.json. This file contains the chef configuration options.

Now you are ready to start the VM. Make sure you don't have anything running on ports 8000, 8443, 5984, or 3000 -- vagrant will forward to these ports from the VM to give you access to the database, application server and rails dev server. Auto correction of ports is currently not enabled to avoid confusion. To start the VM, run:

$ vagrant up

This will take a while as it has to download and compile some stuff from source. While this is running you can modify your hosts file to include our fake domain to use for development. Add the following to your /etc/hosts file (may be a slightly different file on OSX):   primero.test

You will need to access the site on this domain in your browser as the dummy SSL cert is set with this domain.

Once you have the VM fully provisioned, you can access the site at http://primero.test:8000 (or possibly a different port if Vagrant had a port collision when trying to assign port 8000 -- check the Vagrant output upon the up command). It should automatically redirect you to the HTTPS protocol and port 8443. You can login with a preseeded admin account with credentials primero/primer0!.

Vagrant is provisioned using a development Chef file dev-node.json.sample. You can override it by creating your own file dev-node.json. See the README in the cookbook directory for more on configuring Primero Chef files.

Starting development

When the Vagrant box is up and running, SSH in and go to the Primero development directory (synced from your host):

$ vagrant ssh
$ cd ~/primero

Prepare the development environment:

$ bundle install
$ bundle exec rake db:migrate:design
$ bundle exec rake db:seed #This will take a while

To bring up the development server on port 3000:

$ bundle exec rails s

You should now be able to access your development server in the browser on http://primero.test:3000

Automatic development server reloads based on code changes have been disabled. This is intentional. Do not change that!

For more on making code contributions, have a look at the file

Occasionally you may have issues with the JS I18n object not properly loading the correct locales as defined in locales.yml. Due to a caching issue, it may retain an older list of available locales. If this happens, and you have a user set up with a locale not defined in that old stale locales list, when you create a case, the forms will be blank. To resolve this, run the following command from the application directory: $ bundle exec rake tmp:cache:clear

Deploy keys

Since development will happen on forked repositories you will need to make sure that your personal repository has the right deploy key set. To do so, add the key from the node[:primero][:deploy_key] attribute in the dev-node.json file in this repo to your Bitbucket fork's deploy key list. You add the key in Bitbucket by going into the repo admin and clicking on Deployment Keys. You will have to convert the \\n characters in the JSON string to real newlines first.


Primero is deployed in production using Chef. Detailed Chef instructions exist in the file cookbook/

You can’t perform that action at this time.