-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redmine 5.1 isn't supported #116
Comments
I found a related issue in Rails that seems to be the cause of the problem I faced. This issue has already been fixed in Rails version 7. To test if this is really related to this problem, I ran the following command: % plugins/full_text_search/dev/initialize-redmine.sh Additionally, I modified the pgroonga_text_term_search_ops name to pgroonga_text_term_search_ops_v2 by adding a v2 suffix in db/schema.rb. # db/schema.rb
create_table "fts_query_expansions", force: :cascade do |t|
t.text "source", null: false
t.text "destination", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["source", "destination"], name: "fts_query_expansions_index_pgroonga", opclass: :pgroonga_text_term_search_ops, using: :pgroonga
t.index ["updated_at"], name: "index_fts_query_expansions_on_updated_at"
end Although there are still some errors, the main problem seems to be fixed. % plugins/full_text_search/dev/run-test.sh (git)-[5.1-stable]-
++ grep '^gem '\''rails'\''' Gemfile
++ grep -o '[0-9]*'
++ head -n1
+ rails_version_major=6
+ '[' 6 -ge 6 ']'
+ env PSQLRC=/tmp/nonexistent RAILS_ENV=test ruby bin/rails test 'plugins/*/test/**/*_test.rb'
PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from /Users/otegami/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:883:in `new'
PG::Coder.new(hash) is deprecated. Please use keyword arguments instead! Called from /Users/otegami/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/activerecord-6.1.7.6/lib/active_record/connection_adapters/postgresql_adapter.rb:883:in `new'
Run options: --seed 28583
# Running:
.......................................E
Error:
FullTextSearch::SearchControllerTest::ChangeRootURLTest#test_api:
NoMethodError: undefined method `filechanges' for nil:NilClass
plugins/full_text_search/test/functional/full_text_search/search_controller_test.rb:556:in `test_api'
rails test plugins/full_text_search/test/functional/full_text_search/search_controller_test.rb:554
E
Error:
FullTextSearch::SearchControllerTest::ChangeRootURLTest#test_search:
NoMethodError: undefined method `filechanges' for nil:NilClass
plugins/full_text_search/test/functional/full_text_search/search_controller_test.rb:539:in `test_search'
rails test plugins/full_text_search/test/functional/full_text_search/search_controller_test.rb:537
......E
Error:
FullTextSearch::SearchControllerTest::ChangeSubURLTest#test_api:
NoMethodError: undefined method `filechanges' for nil:NilClass
plugins/full_text_search/test/functional/full_text_search/search_controller_test.rb:650:in `test_api'
rails test plugins/full_text_search/test/functional/full_text_search/search_controller_test.rb:648
E
Error:
FullTextSearch::SearchControllerTest::ChangeSubURLTest#test_search:
NoMethodError: undefined method `filechanges' for nil:NilClass
plugins/full_text_search/test/functional/full_text_search/search_controller_test.rb:633:in `test_search'
rails test plugins/full_text_search/test/functional/full_text_search/search_controller_test.rb:631
..................................E
Error:
FullTextSearch::ChangeSubversionTest#test_fetch_changesets:
ActiveRecord::RecordNotFound: Couldn't find Change
plugins/full_text_search/test/unit/full_text_search/change_subversion_test.rb:32:in `test_fetch_changesets'
rails test plugins/full_text_search/test/unit/full_text_search/change_subversion_test.rb:19
E
Error:
FullTextSearch::ChangeSubversionTest#test_fetch_changesets_sub_path:
NoMethodError: undefined method `each' for nil:NilClass
plugins/full_text_search/test/test_helper.rb:191:in `collect_files'
plugins/full_text_search/test/test_helper.rb:181:in `files'
plugins/full_text_search/test/unit/full_text_search/change_subversion_test.rb:73:in `test_fetch_changesets_sub_path'
rails test plugins/full_text_search/test/unit/full_text_search/change_subversion_test.rb:67
Capybara starting Puma...
* Version 6.4.0 , codename: The Eagle of Durango
* Min threads: 0, max threads: 4
* Listening on http://127.0.0.1:56807
...........
Finished in 126.665618s, 0.7579 runs/s, 0.9474 assertions/s.
96 runs, 120 assertions, 0 failures, 6 errors, 0 skips |
Considering these results, I'm thinking about what I should do as a next action. |
I just realized that the master branch uses Rails version 7.1.2 in Redmine.
% git switch master
% bundle install
% plugins/full_text_search/dev/initialize-redmine.sh
+ test_svn_repository=tmp/test/subversion_repository
+ '[' '!' -d tmp/test/subversion_repository ']'
+ test_git_repository=tmp/test/git_repository
+ '[' '!' -d tmp/test/git_repository ']'
+ ruby bin/rails db:drop
bin/rails aborted!
NameError: uninitialized constant FullTextSearch (NameError)
FullTextSearch::Settings
^^^^^^^^^^
/Users/otegami/dev/project/redmine/plugins/full_text_search/init.rb:37:in `block in <top (required)>'
/Users/otegami/dev/project/redmine/plugins/full_text_search/init.rb:88:in `<top (required)>'
/Users/otegami/dev/project/redmine/lib/redmine/plugin_loader.rb:31:in `load'
/Users/otegami/dev/project/redmine/lib/redmine/plugin_loader.rb:31:in `run_initializer'
/Users/otegami/dev/project/redmine/lib/redmine/plugin_loader.rb:108:in `each'
/Users/otegami/dev/project/redmine/lib/redmine/plugin_loader.rb:108:in `block in load'
/Users/otegami/dev/project/redmine/config/environment.rb:16:in `<top (required)>'
Tasks: TOP => db:drop => db:load_config => environment
(See full trace by running task with --trace)
+ true
+ ruby bin/rails generate_secret_token
+ ruby bin/rails db:create
bin/rails aborted!
NameError: uninitialized constant FullTextSearch (NameError)
FullTextSearch::Settings
^^^^^^^^^^
/Users/otegami/dev/project/redmine/plugins/full_text_search/init.rb:37:in `block in <top (required)>'
/Users/otegami/dev/project/redmine/plugins/full_text_search/init.rb:88:in `<top (required)>'
/Users/otegami/dev/project/redmine/lib/redmine/plugin_loader.rb:31:in `load'
/Users/otegami/dev/project/redmine/lib/redmine/plugin_loader.rb:31:in `run_initializer'
/Users/otegami/dev/project/redmine/lib/redmine/plugin_loader.rb:108:in `each'
/Users/otegami/dev/project/redmine/lib/redmine/plugin_loader.rb:108:in `block in load'
/Users/otegami/dev/project/redmine/config/environment.rb:16:in `<top (required)>'
Tasks: TOP => db:create => db:load_config => environment
(See full trace by running task with --trace) |
The latest version of Redmine is 5.1.1 and uses Rails version 6.1.7 judging from official web site. So I'm stuck about how I should deal with this point. @kou
|
Could you use We can use this issue to add support for Redmine 5.1. |
FYI: We want to use |
@kou TODO List for supporting Redmine 5.1
|
"Adding needed changes for Redmine 5.1" is missing. It's the most important task. |
We have CI jobs with Redmine master. |
Thanks. I misunderstood the purpose of this issue. I will search for what we need to support
|
TODO List for supporting Redmine 5.1(master)
|
Ah, Rails versions were same when I saw Redmine master and 5.1. |
We already have it. |
Sure! TODO List for supporting Redmine 5.1
TODO List for supporting Redmine master
|
Solved by #123. |
I encountered an issue while setting up Redmine for development with PostgreSQL as the database.
The error occurred when running the run-test.sh script as part of the full text search plugin setup.
Full error logs
How to Reproduce
My environment
Steps
How to Develop
Expected Behavior
The run-test.sh script should execute without errors, allowing for the testing of the full text search plugin in a development environment.
Steps I tried to Resolve the Issue
bin/rails db:migrate:status RAILS_ENV=test
bin/rails db:migrate RAILS_ENV=test
bin/rails db:migrate:status RAILS_ENV=test
bin/rails db:environment:set RAILS_ENV=test && bin/rails db:drop db:create db:migrate RAILS_ENV=test
plugins/full_text_search/dev/run-test.sh
The text was updated successfully, but these errors were encountered: