Open damir354055 opened 6 years ago
I run in same problem reported 5 years ago in Redmine Forum: https://www.redmine.org/boards/2/topics/42131 :
[root@wwwdev /usr/local/www/redmine]# ruby bin/rake redmine:plugins:migrate NAME=redmine_knowledgebase
(See full trace by running task with --trace)```
LoadError: cannot load such file -- redmine_acts_as_taggable_on/initialize
/usr/local/www/redmine/plugins/redmine_knowledgebase/init.rb:2:in <top (required)>
/usr/local/www/redmine/lib/redmine/plugin.rb:155:in `block in load
/usr/local/www/redmine/lib/redmine/plugin.rb:146:in `each
/usr/local/www/redmine/lib/redmine/plugin.rb:146:in `load
/usr/local/www/redmine/config/initializers/30-redmine.rb:21:in <top (required)>
/usr/local/www/redmine/config/environment.rb:14:in <top (required)>
Tasks: TOP => redmine:plugins:migrate => environment
I do have the gems needed:
[root@wwwdev /usr/local/www/redmine]# gem list acts-
*** LOCAL GEMS ***
acts-as-taggable-on (3.5.0)
[root@wwwdev /usr/local/www/redmine]# gem list redmine
*** LOCAL GEMS ***
redmine_acts_as_taggable_on (1.1.0)```
Environment:
`[root@wwwdev /usr/local/www/redmine]# uname -sr; pkg iinfo redmine; rails -v; ruby -v
FreeBSD 12.0-STABLE
redmine-3.4.11
rubygem-redmine_acts_as_taggable_on-1.1.0
Rails 4.2.11.1
ruby 2.6.5p114 (2019-10-01 revision 67812) [amd64-freebsd12]`
Thanks in advance.
First, I installed the gems from FreeBSD packages.
Now I tried give bundle install
a chance, and it seemed to update the problematic gem:
Using ... (a lot of gem already installed listed here)
Fetching acts-as-taggable-on 4.0.0
Installing acts-as-taggable-on 4.0.0
Bundle complete! 27 Gemfile dependencies, 62 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from acts-as-taggable-on:
When upgrading
Re-run the migrations generator
rake acts_as_taggable_on_engine:install:migrations
This will create any new migrations and skip existing ones
Version 3.5.0 has a migration for mysql adapter
Now I'm running into other problems. I'll try to figure them out.
Dudes, I confess I have no idea it should be made on production. But, since I'm just interested in studying how to create a Redmine plugin, and https://github.com/alexbevi/redmine_acts_as_taggable_on says it is not being maintained, I solved my problem skipping the verification imposed in
[root@wwwdev /usr/local/lib/ruby/gems/2.6/bundler/gems/redmine_acts_as_taggable_on-0ebef70ef692/lib/redmine_acts_as_taggable_on]# diff -u migration.rb.orig migration.rb
--- migration.rb.orig 2019-10-24 17:23:22.450072000 +0000
+++ migration.rb 2019-10-24 17:24:32.716253000 +0000
@@ -9,8 +9,9 @@
class SchemaMismatchError < StandardError; end
def up
- enforce_declarations!
- check_for_old_style_plugins
+ say 'Rodando meu patch em migration.rb'
+ #enforce_declarations!
+ #check_for_old_style_plugins
if ok_to_go_up?
super
Now I could install the redmine_knowledgebase plugin.
after bundle install, have some message
Environment: Redmine version 3.2.9.stable Ruby version 2.2.6-p396 (2016-11-15) [x64-mingw32] Rails version 4.2.7.1 Environment production Database adapter PostgreSQL SCM: Filesystem
Redmine plugins: no plugin installed