redmine_knowledgebase icon indicating copy to clipboard operation
redmine_knowledgebase copied to clipboard

Unable to install plugin in Redmine 6.0.1.stable.

Open Sudro opened this issue 1 year ago • 4 comments

When trying to install the plugin according to the instructions, a problem occurs.

I work with bitnami/redmine (deployed via Helm (in k8s)).

Here is a link to helm bitnami/redmine: https://artifacthub.io/packages/helm/bitnami/redmine

At the very beginning, I execute the command /opt/bitnami/redmine/plugins in the directory: git clone https://github.com/alexbevi/redmine_knowledgebase.git

I go to the /opt/bitnami/redmine directory, log in as the redmine user and do the following: Turning off freezing: bundle config set frozen false

I install gems using this command: bundle install Here is the result: Fetching gem metadata from https://rubygems.org/......... Resolving dependencies... Fetching liquid 4.0.4 Fetching ya2yaml 0.31 Installing liquid 4.0.4 Installing ya2yaml 0.31 Fetching awesome_nested_set 3.8.0 Fetching redmineup 1.0.6 Installing awesome_nested_set 3.8.0 Installing redmineup 1.0.6 Bundle complete! 48 Gemfile dependencies, 91 gems now installed. Gems in the groups 'development', 'sqlite' and 'test' were not installed. Bundled gems are installed into ./vendor/bundle

After this I try to migrate: bundle exec rake redmine:plugins:migrate NAME=redmine_knowledgebase RAILS_ENV=production Here is the result: WARN: Unresolved or ambiguous specs during Gem::Specification.reset: stringio (>= 0) Available/installed versions of this gem: - 3.1.2 - 3.0.4 WARN: Clearing out unresolved specs. Try 'gem cleanup ' Please report a bug if this causes problems. == 20100210212009 CreateCategories: migrating ================================= -- create_table(:kb_categories, {:id=>:integer}) -> 0.0057s == 20100210212009 CreateCategories: migrated (0.0059s) ========================

== 20100211210218 AddParentIdToCategories: migrating ========================== -- add_column(:kb_categories, :parent_id, :int) -> 0.0006s == 20100211210218 AddParentIdToCategories: migrated (0.0007s) =================

== 20100211212704 CreateArticles: migrating =================================== -- create_table(:kb_articles, {:id=>:integer}) -> 0.0406s == 20100211212704 CreateArticles: migrated (0.0409s) ==========================

== 20100213145708 AddAuthorToArticle: migrating =============================== -- add_column(:kb_articles, :author_id, :int, {:default=>0, :null=>false}) -> 0.0015s == 20100213145708 AddAuthorToArticle: migrated (0.0016s) ======================

== 20100213201848 AddViewingTables: migrating ================================= == 20100213201848 AddViewingTables: migrated (0.0038s) ========================

== 20100216000133 AddNestedSetBoundriesToCategory: migrating ================== -- add_column(:kb_categories, :lft, :int) -> 0.0006s -- add_column(:kb_categories, :rgt, :int) -> 0.0004s == 20100216000133 AddNestedSetBoundriesToCategory: migrated (0.0012s) =========

rake aborted! LoadError: cannot load such file -- acts_as_rated (LoadError) internal:/opt/bitnami/ruby/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:37:in require' <internal:/opt/bitnami/ruby/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in require' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:34:in require' /opt/bitnami/redmine/plugins/redmine_knowledgebase/db/migrate/20100317201659_add_ratings_to_articles.rb:2:in class:AddRatingsToArticles' /opt/bitnami/redmine/plugins/redmine_knowledgebase/db/migrate/20100317201659_add_ratings_to_articles.rb:1:in <top (required)>' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1200:in load' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1200:in load_migration' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1194:in migration' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1190:in disable_ddl_transaction' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1596:in use_transaction?' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1588:in ddl_transaction' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1537:in execute_migration_in_transaction' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1512:in each' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1512:in migrate_without_lock' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1457:in block in migrate' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1609:in with_advisory_lock' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1457:in migrate' /opt/bitnami/redmine/lib/redmine/plugin.rb:493:in up' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/activerecord-7.2.2/lib/active_record/migration.rb:1239:in migrate' /opt/bitnami/redmine/lib/redmine/plugin.rb:529:in migrate_plugin' /opt/bitnami/redmine/lib/redmine/plugin.rb:466:in migrate' /opt/bitnami/redmine/lib/redmine/plugin.rb:477:in migrate' /opt/bitnami/redmine/lib/tasks/redmine.rake:150:in block (3 levels) in <top (required)>' /opt/bitnami/redmine/vendor/bundle/ruby/3.2.0/gems/rake-13.2.1/exe/rake:27:in <top (required)>' /opt/bitnami/ruby/bin/bundle:25:in load' /opt/bitnami/ruby/bin/bundle:25:in

' Tasks: TOP => redmine:plugins:migrate (See full trace by running task with --trace)

I couldn't figure out what the error was. I did all this in the /opt/bitnami/redmine directory.

Sudro avatar Dec 03 '24 13:12 Sudro

You can try my fork

git clone https://github.com/yzzy/redmine_knowledgebase.git

Though I didn't test it with Redmine 6, my fork has difference exactly in the file with error in question.

yzzy avatar Dec 04 '24 06:12 yzzy

You can try my fork

git clone https://github.com/yzzy/redmine_knowledgebase.git

Though I didn't test it with Redmine 6, my fork has difference exactly in the file with error in question.

I've implemented compatibility with Redmine 6.x in my fork. No changes on database side, so you can easily switch between my and official plugin's versions.

yzzy avatar Feb 17 '25 11:02 yzzy

When installing into Redmine 5.1 I get following error message.

`== 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 <main>' Tasks: TOP => redmine:plugins:migrate (See full trace by running task with --trace)

jonc310 avatar Apr 21 '25 17:04 jonc310

You can try my fork

git clone https://github.com/yzzy/redmine_knowledgebase.git

Though I didn't test it with Redmine 6, my fork has difference exactly in the file with error in question.

I've implemented compatibility with Redmine 6.x in my fork. No changes on database side, so you can easily switch between my and official plugin's versions.

I could't install it when using https://github.com/yzzy/redmine_knowledgebase. Could you help me to review.Thanks!

rake redmine:plugins:migrate NAME=redmine_knowledgebase RAILS_ENV=production == 20100317201659 AddRatingsToArticles: migrating ============================= rake aborted! StandardError: An error has occurred, all later migrations canceled: (StandardError)

undefined method create_ratings_table' for ActiveRecord::Base:Class /opt/www/redmine-6.0.5/plugins/redmine_knowledgebase/db/migrate/20100317201659_add_ratings_to_articles.rb:3:in up' /opt/www/redmine-6.0.5/lib/redmine/plugin.rb:493:in up' /opt/www/redmine-6.0.5/lib/redmine/plugin.rb:529:in migrate_plugin' /opt/www/redmine-6.0.5/lib/redmine/plugin.rb:466:in migrate' /opt/www/redmine-6.0.5/lib/redmine/plugin.rb:477:in migrate' /opt/www/redmine-6.0.5/lib/tasks/redmine.rake:150:in `block (3 levels) in <top (required)>'

Caused by: NoMethodError: undefined method create_ratings_table' for ActiveRecord::Base:Class (NoMethodError) Did you mean? create_drafts_table create_viewings_table /opt/www/redmine-6.0.5/plugins/redmine_knowledgebase/db/migrate/20100317201659_add_ratings_to_articles.rb:3:in up' /opt/www/redmine-6.0.5/lib/redmine/plugin.rb:493:in up' /opt/www/redmine-6.0.5/lib/redmine/plugin.rb:529:in migrate_plugin' /opt/www/redmine-6.0.5/lib/redmine/plugin.rb:466:in migrate' /opt/www/redmine-6.0.5/lib/redmine/plugin.rb:477:in migrate' /opt/www/redmine-6.0.5/lib/tasks/redmine.rake:150:in `block (3 levels) in <top (required)>' Tasks: TOP => redmine:plugins:migrate

liu757617942 avatar Jun 07 '25 02:06 liu757617942

Try this PR please - https://github.com/alexbevi/redmine_knowledgebase/pull/415, it should work

reshetov avatar Nov 13 '25 14:11 reshetov