Before installing Consul Democracy and having it up and running make sure you all prerequisites installed.
- First, clone the Consul Democracy Github repository and enter the project folder:
git clone https://github.com/consuldemocracy/consuldemocracy.git
cd consuldemocracy- Install the Ruby version we need with your Ruby version manager. Here are some examples:
rvm install `cat .ruby-version` # If you're using RVM
rbenv install `cat .ruby-version` # If you're using rbenv
asdf install ruby `cat .ruby-version` # If you're using asdf- 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)- Install Bundler:
gem install bundler --version 1.17.1- Install the required gems using Bundler:
bundle- Copy the environment example configuration files inside new readable ones:
cp config/database.yml.example config/database.yml
cp config/secrets.yml.example config/secrets.ymlAnd setup database credentials with your consul user in your new database.yml file.
- Run the following Rake tasks to create and fill your local database with the minimum data needed to run the application:
bin/rake db:create
bin/rake db:setup
bin/rake db:dev_seed
bin/rake db:test:prepare- Check everything is fine by running the test suite (beware it might take more than an hour):
bin/rspec- Now you have all set, run the application:
bin/rails sCongratulations! 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.