Technical Documentation
Return to Main Documentation
ENGLISH - version 2.3
ENGLISH - version 2.3
  • Introduction
  • Getting started
    • Create your fork
    • Configure your fork
    • Keep your fork updated
    • Communication
  • Installation
    • Local installation
      • Prerequisites
      • Ubuntu Linux
      • Debian Linux
      • macOS
      • Windows
      • Vagrant
      • Docker
    • Production and staging servers
      • Installer
      • Create a deploy user
      • Generating SSH Key
      • Manual installation (not recommended)
      • Digital Ocean
      • Heroku
      • Mail server configuration
    • Basic configuration
    • User documentation and guides
  • Customization
    • Introduction
    • Translations and texts
    • Images
    • Styles with CSS
    • JavaScript
    • Models
    • Controllers
    • Views and HTML
    • Components
    • Other Ruby classes (GraphQL, lib, mailers, builders)
    • Gems
    • Application configuration
    • Routes
    • Tests
  • Technical Features
    • OAuth
    • GraphQL
    • Debates and proposals recommendations
    • Configure Census Connection
    • Local Census
    • Multitenancy
    • User content translations
  • Open Source project
    • Code of conduct
    • Contributing
    • Coding conventions
    • Open source forks and modifications
    • License
Powered by GitBook
On this page
  1. Installation

Local installation

PreviousInstallationNextPrerequisites

Last updated 2 months ago

Before installing Consul Democracy and having it up and running make sure you have all installed.

  1. First, clone the and enter the project folder:

git clone https://github.com/consuldemocracy/consuldemocracy.git
cd consuldemocracy
  1. Install the Ruby version we need with your Ruby version manager. Here are some examples:

rbenv install `cat .ruby-version` # If you're using rbenv
rvm install `cat .ruby-version` # If you're using RVM
asdf install ruby `cat .ruby-version` # If you're using asdf
  1. Check we're using the Ruby version we've just installed:

ruby -v
=> # (it should be the same as the version in the .ruby-version file)
  1. Install the Node.js version we need with your Node.js version manager. If you're using NVM:

nvm install `cat .node-version`
nvm use `cat .node-version`
  1. Copy the example database configuration file:

cp config/database.yml.example config/database.yml
  1. Setup database credentials with your consul user in your new database.yml file

Note: this step is not necessary if you're using a database user without a password and the same username as your system username, which is the default in macOS.

nano config/database.yml

And edit the lines containing username: and password:, adding your credentials.

  1. Install the project dependencies and create the database:

bin/setup
bin/rake db:dev_seed
  1. Check everything is fine by running the test suite

Note: running the whole test suite on your machine might take more than an hour, so it's strongly recommended that you setup a Continuous Integration system in order to run them using parallel jobs every time you open or modify a pull request (if you use GitHub Actions or GitLab CI, this is already configured in .github/workflows/tests.yml and .gitlab-ci.yml) and only run tests related to your current task while developing on your machine. When you configure the application for the first time, it's recommended that you run at least one test in spec/models/ and one test in spec/system/ to check your machine is properly configured to run the tests.

bin/rspec
  1. Now you have all set, run the application:

bin/rails s

Congratulations! Your local Consul Democracy application will be running now at http://localhost:3000.

In case you want to access the local application as admin, a default user verified and with admin permissions was created by the seed files with username admin@consul.dev and password 12345678.

If you need an specific user to perform actions such as voting without admin permissions, a default verified user is also available with username verified@consul.dev and password 12345678.

Run the following to fill your local database with development data:

prerequisites
Consul Democracy Github repository
Rake task