Где найти настройки требований для плагинов Redmine?

561
Montag451

Я пытаюсь установить плагин easyredmine на стек Bitnami Redmine 2.5.0. (Это Ubuntu 12.04 VM) Я думаю, что я на последнем этапе, где я застрял. Когда я запускаю команду "bundle exec rake easyproject: install RAILS_ENV = production", я получаю ошибку rake, где главная проблема заключается в следующем:

...
вызывая очистку ...
грабли прерваны!
Redmine :: PluginRequirementError: плагину easy_extensions требуется Redmine 2.5.1 или выше, но текущая версия
2.5.0.stable /home/.../redmine-2.5.0-0/apps/redmine/htdocs/lib/redmine/plugin.rb : 188: в блоке внутри require_redmine
...

Это продолжается и продолжается, как это. Я нашел этот файл plugin.rb, но не смог найти связанный файл, содержащий требование к версии.

Мои вопросы:

1- В каком файле находится этот раздел требований?
2- Если я поменяю его на версию 2.5.0, смогу ли я установить плагин?
3- Если я установлю плагин, обманывая его таким образом, у меня возникнут проблемы с версией?

1

1 ответ на вопрос

0
Montag451

I've spent half my day solving this. I think it would at least be helpful to others who get stuck at plugin installation related version requirement problems with Redmine.

If you thoroughly inspect the plugin.rb file from the error message, you'll see that the requirement statement is in the init.rb file. Its path can be found in plugin.rb's initializer section which is on line 123. It was a little bit hard for me to understand that it pointed to the plugin's own root path. There I found the main init.rb file, and in it was again an initializer section on line 173 which pointed to my final destination which was defined a few lines before it. The lines before the initializer section do define some paths which in the end brought me to "…/plugins/easyproject/easy_plugins/easy_extensions/init.rb".

This file's last line reads as "requires_redmine :version_or_higher => '2.5.1'" which is where you put your magic into.

After I edited it to '2.5.0' the bundle rake install command did respond correctly by migrating the plugin.

Now my Redmine has the plugin and works flawlessly but the only part that I'm not sure is if this will cause version incompatibility problems in the future.

I'll report back if I encounter a problem. I already asked easyredmine support about it and waiting for their reply. There are very few changes between 2.5.0 and 2.5.1 which comforts me a little bit.

Похожие вопросы