Patch #43897 ยป use-bin_rails-instead-of-rake.patch
| doc/INSTALL | ||
|---|---|---|
|
Redmine stores session data in cookies by default, which requires
|
||
|
a secret to be generated. Under the application main directory run:
|
||
|
bundle exec rake generate_secret_token
|
||
|
bin/rails generate_secret_token
|
||
|
Alternatively, you can store this secret in config/secrets.yml:
|
||
|
https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#config-secrets-yml
|
||
| ... | ... | |
|
To manually compile assets or if automatic compilation is disabled:
|
||
|
using:
|
||
|
bundle exec rake assets:precompile RAILS_ENV="production"
|
||
|
bin/rails assets:precompile RAILS_ENV="production"
|
||
|
If deploying to a sub-uri, set the relative URL root as follows:
|
||
|
bundle exec rake assets:precompile RAILS_ENV="production" RAILS_RELATIVE_URL_ROOT=/sub-uri
|
||
|
bin/rails assets:precompile RAILS_ENV="production" RAILS_RELATIVE_URL_ROOT=/sub-uri
|
||
|
If you experience issues with missing assets in the browser, try
|
||
|
removing the public/assets directory before re-running the precompile:
|
||
|
bundle exec rake assets:clobber RAILS_ENV="production"
|
||
|
bin/rails assets:clobber RAILS_ENV="production"
|
||
|
7. Create the database structure
|
||
|
Under the application main directory run:
|
||
|
bundle exec rake db:migrate RAILS_ENV="production"
|
||
|
bin/rails db:migrate RAILS_ENV="production"
|
||
|
It will create all the tables and an administrator account.
|
||
| doc/RUNNING_TESTS | ||
|---|---|---|
|
Running Tests
|
||
|
=============
|
||
|
Run `rake --tasks test` to see available tests.
|
||
|
Run `rake test` to run the entire test suite (except the tests for the
|
||
|
Run `bin/rails --tasks test` to see available tests.
|
||
|
Run `bin/rails test` to run the entire test suite (except the tests for the
|
||
|
Apache perl module Redmine.pm and Capybara tests, see below).
|
||
|
You can run `ruby test/unit/issue_test.rb` for running a single test case and
|
||
| ... | ... | |
|
You can run tests in parallel by setting the PARALLEL_WORKERS environment
|
||
|
variable:
|
||
|
`PARALLEL_WORKERS=8 rake test`
|
||
|
`PARALLEL_WORKERS=8 bin/rails test`
|
||
|
Before running tests, you need to configure both development
|
||
|
and test databases.
|
||
| ... | ... | |
|
Redmine supports a wide array of different version control systems.
|
||
|
To test the support, a test repository needs to be created for each of those.
|
||
|
Run `rake --tasks test:scm:setup` for a list of available test-repositories or
|
||
|
run `rake test:scm:setup:all` to set up all of them. The repositories are
|
||
|
Run `bin/rails --tasks test:scm:setup` for a list of available test-repositories or
|
||
|
run `bin/rails test:scm:setup:all` to set up all of them. The repositories are
|
||
|
unpacked into {redmine_root}/tmp/test.
|
||
|
If the test repositories are not present, the tests that need them will be
|
||
| ... | ... | |
|
Chromedriver is managed by the `webdrivers` gem (https://rubygems.org/gems/webdrivers)
|
||
|
Capybara tests can be run with:
|
||
|
`rails test:system`
|
||
|
`bin/rails test:system`
|
||
|
The following environment variables can be used to configure your system tests setup:
|
||
|
`CAPYBARA_SERVER_HOST`: configure server to run on a custom IP which can be, for example, your remote Selenium IP or 0.0.0.0 to listen an all connections
|
||
| doc/UPGRADING | ||
|---|---|---|
|
Then generate a new secret by running the following command under the
|
||
|
application directory:
|
||
|
bundle exec rake generate_secret_token
|
||
|
bin/rails generate_secret_token
|
||
|
Alternatively, you can store this secret in config/secrets.yml:
|
||
|
https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#config-secrets-yml
|
||
| ... | ... | |
|
To manually compile assets or if automatic compilation is disabled:
|
||
|
using:
|
||
|
bundle exec rake assets:precompile RAILS_ENV="production"
|
||
|
bin/rails assets:precompile RAILS_ENV="production"
|
||
|
If deploying to a sub-uri, set the relative URL root as follows:
|
||
|
bundle exec rake assets:precompile RAILS_ENV="production" RAILS_RELATIVE_URL_ROOT=/sub-uri
|
||
|
bin/rails assets:precompile RAILS_ENV="production" RAILS_RELATIVE_URL_ROOT=/sub-uri
|
||
|
If you experience issues with missing assets in the browser, try
|
||
|
removing the public/assets directory before re-running the precompile:
|
||
|
bundle exec rake assets:clobber RAILS_ENV="production"
|
||
|
bin/rails assets:clobber RAILS_ENV="production"
|
||
|
8. Migrate your database
|
||
|
If you are upgrading to Rails 2.3.14 as part of this migration, you
|
||
|
need to upgrade the plugin migrations before running the plugin migrations
|
||
|
using:
|
||
|
bundle exec rake db:migrate:upgrade_plugin_migrations RAILS_ENV="production"
|
||
|
bin/rails db:migrate:upgrade_plugin_migrations RAILS_ENV="production"
|
||
|
Please make a backup before doing this! Under the new application
|
||
|
directory run:
|
||
|
bundle exec rake db:migrate RAILS_ENV="production"
|
||
|
bin/rails db:migrate RAILS_ENV="production"
|
||
|
If you have installed any plugins, you should also run their database
|
||
|
migrations using:
|
||
|
bundle exec rake db:migrate_plugins RAILS_ENV="production"
|
||
|
bin/rails redmine:plugins:migrate RAILS_ENV="production"
|
||
|
9. Clear the cache and the existing sessions by running:
|
||
|
bundle exec rake tmp:cache:clear tmp:sessions:clear
|
||
|
bin/rails tmp:cache:clear tmp:sessions:clear
|
||
|
10. Restart the application server (e.g. mongrel, thin, passenger)
|
||