CONSUL
Search…
Local installation
Before installing Consul and having it up and running make sure you all prerequisites installed.
    1.
    First, clone the Consul Github repository and enter the project folder:
1
git clone https://github.com/consul/consul.git
2
cd consul
Copied!
    1.
    Install the Ruby version we need with your Ruby version manager. Here are some examples:
1
rvm install `cat .ruby-version` # If you're using RVM
2
rbenv install `cat .ruby-version` # If you're using rbenv
3
asdf install ruby `cat .ruby-version` # If you're using asdf
Copied!
    1.
    Check we're using the Ruby version we've just installed:
1
ruby -v
2
=> # (it should be the same as the version in the .ruby-version file)
Copied!
    1.
    Install Bundler:
1
gem install bundler --version 1.17.1
Copied!
    1.
    Install the required gems using Bundler:
1
bundle
Copied!
    1.
    Copy the environment example configuration files inside new readable ones:
1
cp config/database.yml.example config/database.yml
2
cp config/secrets.yml.example config/secrets.yml
Copied!
And setup database credentials with your consul user in your new database.yml file.
    1.
    Run the following Rake tasks to create and fill your local database with the minimum data needed to run the application:
1
bin/rake db:create
2
bin/rake db:setup
3
bin/rake db:dev_seed
4
bin/rake db:test:prepare
Copied!
    1.
    Check everything is fine by running the test suite (beware it might take more than an hour):
1
bin/rspec
Copied!
    1.
    Now you have all set, run the application:
1
bin/rails s
Copied!
Congratulations! Your local Consul 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 [email protected] 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 [email protected] and password 12345678.
Last modified 6mo ago
Copy link