Skip to content

Installation

Brian Riley edited this page Mar 6, 2018 · 43 revisions

Requirements

Roadmap is a Ruby on Rails application that requires the following:

  • Ruby between 2.1.10 and 2.2.7 (2.4.0+ to be tested soon)
  • Rails between 4.2.0 and 4.2.9 (5.0.0+ to be tested soon)
  • PostgreSQL >= 9.2 or MySQL / MariaDB >= 5.5
  • Node.js for management of assets (DMPRoadmap is no longer using the Rails assets pipeline)

Further details on how to install Ruby on Rails applications are available from the Ruby on Rails site: http://rubyonrails.org

Further details on how to install the database server and create your first user and database. Be sure to follow the instructions for your particular environment.

You may also find the following resources useful:

Installation

  • Create your database

    • For MySQL: Select UTF-8 Unicode (utf8mb4) encoding.
  • Fork the repository and then clone it onto your server

    git clone https://github.com/[your organization]/roadmap.git
    
    cd roadmap
  • Make copies of the yaml configuration files and update the values for your installation

    cp config/database_example.yml config/database.yml
    
    cp config/secrets_example.yml config/secrets.yml
    
    cp config/branding_example.yml config/branding.yml
  • Make copies of the example gem initializer files and update the values for your installation

    cp config/initializers/devise.rb.example config/initializers/devise.rb
    
    cp config/initializers/recaptcha.rb.example config/initializers/recaptcha.rb
    
    cp config/initializers/wicked_pdf.rb.example config/initializers/wicked_pdf.rb
    
    cp config/locales/*.yml.example config/locales/*.yml
  • Create an environment variable for your instance's secret (as defined in config/secrets.yml). You should use the following command to generate secrets for each of your environments, storing the production one in the environment variable:

    rake secret
  • Run bundler and perform the DB migrations

    gem install bundler  # (if bundler is not yet installed)
    
    bundle install
    
    rake db:schema:load
    
    rake db:seed  # (Unless you are migrating data from an old DMPonline system)

    If you are migrating from a legacy DMPonline system follow this guide instead.

  • Install npm and webpack and then bundle the assets (requires the installation of node.js).

    cd lib/assets
    npm install
    npm run bundle
  • Once webpack is running, open a second window/tab and start the application

    rails server
  • Verify that the site is running properly by going to http://localhost:3000 .

  • Login as the default administrator: 'super_admin@example.com' - 'password123'.

Post Installation

You should perform the following tasks prior to deploying the system on a server that is accessible to the web:

  • Delete the users included in the seeds.rb file (e.g. super_admin@example.com) or at least change their passwords.

  • Make sure you have created unique secrets for your config/secrets.yml file (see instructions above).

  • Update the site's Branding.

  • Update the mailer url in config/environments/production.rb (line 68).

Clone this wiki locally