-
Notifications
You must be signed in to change notification settings - Fork 109
Installation
Roadmap is a Ruby on Rails application that requires the following:
-
Ruby >=
2.6.3
-
Rails >=
5.2
-
PostgreSQL
>= 9.2
or MySQL>= 5.5
-
Node.js
8.x
for management of assets (DMPRoadmap is using the Rails asset pipeline with Webpacker) - ImageMagick used by the Dragonfly gem to manage logos
Further details on how to install Ruby on Rails applications are available from the Ruby on Rails site:
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.
-
PostgreSQL documentation:
-
MySQL documentation:
- Install: http://dev.mysql.com/downloads/mysql/
- Create a user: http://dev.mysql.com/doc/refman/5.7/en/create-user.html
- Create the database: http://dev.mysql.com/doc/refman/5.7/en/creating-database.html
You may also find the following resources useful:
- The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html
- Ruby on Rails Tutorial Book: http://www.railstutorial.org/
-
Create your database
- For MySQL: Select UTF-8 Unicode (
utf8mb4
) encoding.
- For MySQL: Select UTF-8 Unicode (
-
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 copy the gem initializer files
bin/setup
-
To create environment variables one would need to generate credentials and that will be added to
config/credentials.yml.enc
. To do so, you should use the following command to create and opencredentials.yml.enc
:EDITOR=[my_fab_editor] rails credentials:edit
This command will open an editor of your choico. You will need to copy the text bellow with your correct info and save. The new file will appear under config/
:
bash # Used as the base secret for all MessageVerifiers in Rails, including the one protecting cookies. secret_key_base: "replace_with_your_secret_key" # used in config/initializers/devise.rb devise_pepper: "replace_with_your_pepper" #used in config/initializers/dragonfly.rb dragonfly_secret: "replace_with_your_dregaonfly_secret" # used in recaptcha.rb recaptcha: site_key: 'replace_this_with_your_public_key' secret_key: 'replace_this_with_your_private_key'
-
Run bundler and load the latest DB schema
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 (node package manager) and Webpack and then bundle the assets (requires the installation of node.js). To install node dependencies, run the Webpacker rake task:
rake webpacker:yarn_install
-
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
'.
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). -
Designate/create an organization that will become the generic catch-all Org for the application. Users who do not specify and Org from the dropdown list when they create their account will become associated with this generic Org. To designate the Org as the 'other' organization you must set its
orgs.is_other
value to true -
Designate/create a default template. If a user creates a plan and specifies no research organization and no funder (or a combination that results in no published templates) then their plan is created using a default template. You must define your default template in the DB by setting
templates.is_default
equal to true.
- Home
- About
- Development roadmap
- Releases
- Themes
- Google Analytics
- Get involved
- Translations
- Developer guide