How To Install Redmine X Statistics
1. Install Base Statistics
Unzip the archive and upload the folder redmine_x_statistics to redmine_root/plugins or upload the archive in the same location and perform the unzip command in the console. Do NOT change the plugin folder name.
2. Install Gems
From redmine_root run bundle install. No need for any migration (rake).
If the gems were installed correctly, this is roughly what you should see.

3. Migrate
When installing RedmineX Statistics plugin, you need to run the migration command bundle exec rake redmine:plugins:migrate RAILS_ENV=production.
If the migration went well, this is roughly what you should see.

4. Load Default Data (1.1.2 and below only)
If you have a version 1.1.3+, you can skip this step. When installing Redmine X Statistics plugin, you need to run bundle exec rake redmine:redmine_x_statistics:load_default_charts RAILS_ENV=production.
If the default data were loaded correctly, this is roughly what you should see.

5. Install Statistic Addons
If you are installing additional graphs into the Statistics plugin, then unzip the archive and upload the folder redmine_x_statistics to redmine_root/plugins. If your transfer client is set right, the additional graph folder will get uploaded into /plugins/redmine_x_statistics/lib/redmine_x_statistics/providers/data.
If you get asked whether to override or merge, always choose merge. If you are not sure how your client behaves, go to the path/plugins/redmine_x_statistics/lib/redmine_x_statistics/providers/data and upload just the graph folder, e.g.crm or helpdesk.
6. Restart
Restart Redmine. Based on your hosting provider / web server, you will need to run the following commands. Puma: sudo systemctl restart redmine.yourcompany.com.service or Passenger: touch tmp/restart.txt.
7. Allow Statistics For Specific Roles
Go to ~/roles and for each role, select the permissions for the project and global Statistics.
8. Add code
From Redmine 5.0.3, there is a security issue so you will need to add 1 line of code into the Redmine config file. Locate config/applicaiton.rb and line 38 which says ActionController::Parameters. Add 1 line under this line saying ActiveSupport::Duration so the code looks like this:
