Where to find the requirement settings for Redmine plugins?

1

I'm trying to install the easyredmine plugin onto the Bitnami Redmine 2.5.0 stack. (This is a Ubuntu 12.04 VM) I think I'm at the last step where I'm stuck at. When I run the "bundle exec rake easyproject:install RAILS_ENV=production" command, I get a rake error where the main problem is this:

...
Invoking clearing session...
rake aborted!
Redmine::PluginRequirementError: easy_extensions plugin requires Redmine 2.5.1 or higher but current is 2.5.0.stable
/home/.../redmine-2.5.0-0/apps/redmine/htdocs/lib/redmine/plugin.rb:188:in `block in requires_redmine'
...

It goes on and on like this. I located this plugin.rb file but couldn't find the related file which contains the version requirement.

My questions are:

1- In which file is this requirement section?
2- If I change it to my version which is 2.5.0 will I be able to install the plugin?
3- If I install the plugin by fooling it this way, would I later experience version related issues?

Montag451

Posted 2014-04-28T14:43:17.040

Reputation: 672

Answers

0

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.

Montag451

Posted 2014-04-28T14:43:17.040

Reputation: 672