Project

General

Profile

Patch #43897 ยป use-bin_rails-instead-of-rake.patch

Go MAEDA, 2026-03-22 10:54

View differences:

doc/INSTALL
53 53

  
54 54
   Redmine stores session data in cookies by default, which requires
55 55
   a secret to be generated. Under the application main directory run:
56
     bundle exec rake generate_secret_token
56
     bin/rails generate_secret_token
57 57

  
58 58
   Alternatively, you can store this secret in config/secrets.yml:
59 59
   https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#config-secrets-yml
......
69 69
   To manually compile assets or if automatic compilation is disabled:
70 70

  
71 71
   using:
72
     bundle exec rake assets:precompile RAILS_ENV="production"
72
     bin/rails assets:precompile RAILS_ENV="production"
73 73

  
74 74
   If deploying to a sub-uri, set the relative URL root as follows:
75
     bundle exec rake assets:precompile RAILS_ENV="production" RAILS_RELATIVE_URL_ROOT=/sub-uri
75
     bin/rails assets:precompile RAILS_ENV="production" RAILS_RELATIVE_URL_ROOT=/sub-uri
76 76

  
77 77
   If you experience issues with missing assets in the browser, try
78 78
   removing the public/assets directory before re-running the precompile:
79
     bundle exec rake assets:clobber RAILS_ENV="production"
79
     bin/rails assets:clobber RAILS_ENV="production"
80 80

  
81 81
7. Create the database structure
82 82

  
83 83
   Under the application main directory run:
84
     bundle exec rake db:migrate RAILS_ENV="production"
84
     bin/rails db:migrate RAILS_ENV="production"
85 85

  
86 86
   It will create all the tables and an administrator account.
87 87

  
doc/RUNNING_TESTS
7 7
Running Tests
8 8
=============
9 9

  
10
Run `rake --tasks test` to see available tests.
11
Run `rake test` to run the entire test suite (except the tests for the
10
Run `bin/rails --tasks test` to see available tests.
11
Run `bin/rails test` to run the entire test suite (except the tests for the
12 12
Apache perl module Redmine.pm and Capybara tests, see below).
13 13

  
14 14
You can run `ruby test/unit/issue_test.rb` for running a single test case and
......
16 16

  
17 17
You can run tests in parallel by setting the PARALLEL_WORKERS environment
18 18
variable:
19
`PARALLEL_WORKERS=8 rake test`
19
`PARALLEL_WORKERS=8 bin/rails test`
20 20

  
21 21
Before running tests, you need to configure both development
22 22
and test databases.
......
27 27
Redmine supports a wide array of different version control systems.
28 28
To test the support, a test repository needs to be created for each of those.
29 29

  
30
Run `rake --tasks test:scm:setup` for a list of available test-repositories or
31
run `rake test:scm:setup:all` to set up all of them. The repositories are
30
Run `bin/rails --tasks test:scm:setup` for a list of available test-repositories or
31
run `bin/rails test:scm:setup:all` to set up all of them. The repositories are
32 32
unpacked into {redmine_root}/tmp/test.
33 33

  
34 34
If the test repositories are not present, the tests that need them will be
......
74 74
Chromedriver is managed by the `webdrivers` gem (https://rubygems.org/gems/webdrivers)
75 75

  
76 76
Capybara tests can be run with:
77
`rails test:system`
77
`bin/rails test:system`
78 78

  
79 79
The following environment variables can be used to configure your system tests setup:
80 80
`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
49 49

  
50 50
   Then generate a new secret by running the following command under the
51 51
   application directory:
52
     bundle exec rake generate_secret_token
52
     bin/rails generate_secret_token
53 53

  
54 54
   Alternatively, you can store this secret in config/secrets.yml:
55 55
   https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#config-secrets-yml
......
67 67
   To manually compile assets or if automatic compilation is disabled:
68 68

  
69 69
   using:
70
     bundle exec rake assets:precompile RAILS_ENV="production"
70
     bin/rails assets:precompile RAILS_ENV="production"
71 71

  
72 72
   If deploying to a sub-uri, set the relative URL root as follows:
73
     bundle exec rake assets:precompile RAILS_ENV="production" RAILS_RELATIVE_URL_ROOT=/sub-uri
73
     bin/rails assets:precompile RAILS_ENV="production" RAILS_RELATIVE_URL_ROOT=/sub-uri
74 74

  
75 75
   If you experience issues with missing assets in the browser, try
76 76
   removing the public/assets directory before re-running the precompile:
77
     bundle exec rake assets:clobber RAILS_ENV="production"
77
     bin/rails assets:clobber RAILS_ENV="production"
78 78

  
79 79
8. Migrate your database
80 80

  
81 81
   If you are upgrading to Rails 2.3.14 as part of this migration, you
82 82
   need to upgrade the plugin migrations before running the plugin migrations
83 83
   using:
84
     bundle exec rake db:migrate:upgrade_plugin_migrations RAILS_ENV="production"
84
     bin/rails db:migrate:upgrade_plugin_migrations RAILS_ENV="production"
85 85

  
86 86
   Please make a backup before doing this! Under the new application
87 87
   directory run:
88
     bundle exec rake db:migrate RAILS_ENV="production"
88
     bin/rails db:migrate RAILS_ENV="production"
89 89

  
90 90
   If you have installed any plugins, you should also run their database
91 91
   migrations using:
92
     bundle exec rake db:migrate_plugins RAILS_ENV="production"
92
     bin/rails redmine:plugins:migrate RAILS_ENV="production"
93 93

  
94 94
9. Clear the cache and the existing sessions by running:
95
     bundle exec rake tmp:cache:clear tmp:sessions:clear
95
     bin/rails tmp:cache:clear tmp:sessions:clear
96 96

  
97 97
10. Restart the application server (e.g. mongrel, thin, passenger)
98 98

  
    (1-1/1)