redmine_knowledgebase
redmine_knowledgebase copied to clipboard
Unable to install in Redmine 5.1.
When trying to install into redmine 5.1 I get an error during migration. Error Sowed below I can do trace if more information is needed.
== 20100317201659 AddRatingsToArticles: migrating ============================= rake aborted! StandardError: An error has occurred, this and all later migrations canceled:
undefined method create_ratings_table' for ActiveRecord::Base:Class Did you mean? create_drafts_table create_viewings_table /mnt/extra/redmine/plugins/redmine_knowledgebase/db/migrate/20100317201659_add_ratings_to_articles.rb:3:in up'
/mnt/extra/redmine/lib/redmine/plugin.rb:482:in up' /mnt/extra/redmine/lib/redmine/plugin.rb:518:in migrate_plugin'
/mnt/extra/redmine/lib/redmine/plugin.rb:455:in migrate' /mnt/extra/redmine/lib/redmine/plugin.rb:466:in migrate'
/mnt/extra/redmine/lib/tasks/redmine.rake:151:in block (3 levels) in <top (required)>' /root/.rbenv/versions/3.1.6/bin/bundle:25:in load'
/root/.rbenv/versions/3.1.6/bin/bundle:25:in `
Caused by:
NoMethodError: undefined method create_ratings_table' for ActiveRecord::Base:Class Did you mean? create_drafts_table create_viewings_table /mnt/extra/redmine/plugins/redmine_knowledgebase/db/migrate/20100317201659_add_ratings_to_articles.rb:3:in up'
/mnt/extra/redmine/lib/redmine/plugin.rb:482:in up' /mnt/extra/redmine/lib/redmine/plugin.rb:518:in migrate_plugin'
/mnt/extra/redmine/lib/redmine/plugin.rb:455:in migrate' /mnt/extra/redmine/lib/redmine/plugin.rb:466:in migrate'
/mnt/extra/redmine/lib/tasks/redmine.rake:151:in block (3 levels) in <top (required)>' /root/.rbenv/versions/3.1.6/bin/bundle:25:in load'
/root/.rbenv/versions/3.1.6/bin/bundle:25:in `
Did you issue bundle install before running migrations?
Yes, I had this setup with Redmine 4.x before and was in the process of setting up a new vm with Redmine 5.1 since I noticed all our plugins were now compatible up to 6.0.
Maybe you'll try my fork? Plugin initialization is a bit different there.
git clone https://github.com/yzzy/redmine_knowledgebase.git
I tried Alexanders first got error act_as_rated was missing and a different issues after I got that gem loaded. Then I tried your fork since it said it was good for Redmine 6 and got error I posted on github. I do have other plugins installed from redmineup and redmineX. I have attached my information page.
Regards, Jon
On Tue, Apr 22, 2025 at 6:42 AM Alexander Abramov @.***> wrote:
Maybe you'll try my fork? Plugin initialization is a bit different there. git clone https://github.com/yzzy/redmine_knowledgebase.git
— Reply to this email directly, view it on GitHub https://github.com/alexbevi/redmine_knowledgebase/issues/414#issuecomment-2820915279, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5Z6JPFA2ZWMBWAJLWL4ZL322YMILAVCNFSM6AAAAAB3RYEZG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMRQHEYTKMRXHE . You are receiving this because you authored the thread.Message ID: @.***> yzzy left a comment (alexbevi/redmine_knowledgebase#414) https://github.com/alexbevi/redmine_knowledgebase/issues/414#issuecomment-2820915279
Maybe you'll try my fork? Plugin initialization is a bit different there. git clone https://github.com/yzzy/redmine_knowledgebase.git
— Reply to this email directly, view it on GitHub https://github.com/alexbevi/redmine_knowledgebase/issues/414#issuecomment-2820915279, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5Z6JPFA2ZWMBWAJLWL4ZL322YMILAVCNFSM6AAAAAB3RYEZG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMRQHEYTKMRXHE . You are receiving this because you authored the thread.Message ID: @.***>
ActiveRecord has been renamed to ApplicationRecord per this Redmine discussion.
Meanwhile, the database migration 20100317201659_add_ratings_to_articles.rb still invokes the method create_ratings_table of the deprecated ActiveRecord class.
I believe that's the cause of the reported error, which also persists in yzzy's fork https://github.com/yzzy/redmine_knowledgebase.git
Here's the implementation of the offending create_ratings_table
Try this PR please - https://github.com/alexbevi/redmine_knowledgebase/pull/415, it should work