Project

General

Profile

Custum plugin error

Added by Bob Huiskes about 4 years ago

Hi All,

I'm totally new to redmine. I have get de task to migrate to the newest version of Redmine 4.1.1. Our previous admin has made self some plugin for Redmine versie 3.4.6. But when I start redmine I get a error:
NameError (uninitialized constant #<Class:0x00000000062778c8>::AuthMandate
Did you mean? AuthMandate):
lib/redmine/sudo_mode.rd:65:in 'sudo_mode'

The code what goes wrong is:
@auth_madates = enumeration::AuthMandate.where("project_id = ? ", User.current.id).to_a

Can someone explain what goed wrong and maybe help to solve this error.

Thanks


Replies (6)

RE: Custum plugin error - Added by Liane Hampe about 4 years ago

Hi Bob,

when migrating Redmine with plugins on board you need to move them out before.

The error you face comes due to a loading order problem. Therefore, migrate Redmine without any plugin first. Afterwards, move the plugins one after another back to Redmine. Consider dependencies when defining the order for moving back.

Best Regards,
Liane

RE: Custum plugin error - Added by Bob Huiskes about 4 years ago

Hi Liane,

That is exactly what I did. Installed the new version of Redmine, set it up and checked if it's working. It works fine.
Then I copied the plugin and restarted de service. When I open the website I get the error.

RE: Custum plugin error - Added by Liane Hampe about 4 years ago

Hi Bob,

Okay, I didn't expected it. :)

When Ruby has problems during constant lookup after everything was installed considering all dependencies then the reason is somewhere deeper in the code.

Without having the codebase on the own screen it is impossible to see what is going on. There are so many reasons why the constant lookup could fail. Something in the ancestors chain where AuthMandate is integrated seems to have changed. Difficult to find remotely ...

Did the plugin have gem dependencies or is AuthMandate a direct module of your plugin?

Best Regards,
Liane

RE: Custum plugin error - Added by Bob Huiskes about 4 years ago

Hi Liane,

Thanks again for your time to help me. I'm completely new to Redmine and Ruby so I can't say if the plugin has gem dependencies or that AuthMandate is a direct module. Is there a way to see that?

Bob

RE: Custum plugin error - Added by Liane Hampe about 4 years ago

Yes, you need to navigate into the plugin directory and look for a file called Gemfile.

But to be honest to you, Bob, when you never code anything in Ruby than it is very likely to difficult for you to solve the problem in an acceptable amount of time.

Couldn't you contact the author of your custom plugin and ask for help? This seems to me the best solution for this moment.

RE: Custum plugin error - Added by Bob Huiskes about 4 years ago

Hi Liane,

There is no file called Gemfile. So the module is coded in the plugin?

It would be the best way to contact the author of the plugin, but he doesn't work any more for my company. But I learn a lot the last days and hope to learn a lot more about Redmine (Ruby) especially about the structure of the plugin.

Bob

    (1-6/6)