dhanasingh / redmine_wktime

ERPmine is an open source free ERP for Service Industries. It runs within Redmine
https://erpmine.org/
Other
120 stars 78 forks source link

rake aborted! - LoadError: cannot load such file -- timelogcontroller_patch #300

Open AppLEaDaY opened 8 months ago

AppLEaDaY commented 8 months ago

Hello!

I'm trying to upgrade Redmine from version 4.2.3 to version 5.1.0.

I'm getting the messages mentioned in the subject upon launching the command below.

bundle exec rake db:migrate RAILS_ENV=production

I noticed timelogcontroller_patch is related to the ERPmine plugin.

The version of ERPmine on the file system is presumably 4.5, at least I deduce this from a mention in the file plugins/redmine_wktime/README.rdoc.

I know almost nothing about Ruby and Ruby on Rails.

I got stuck at the same point when I tried with Redmine 5.0.6.

Would you please help me?

Thanks in advance!

Andrea

cdhana17 commented 8 months ago

Andrea, We haven't released an ERPmine version for Redmine 5.1.0 yet, we should be able to release it in a week or two. until then can you use 5.0.6?

you can use ERPmine version > 4.5.2 for Redmine 5.0.6

you should first upgrade Redmine and then try to upgrade ERPmine, DO NOT try to upgrade both at the same time.

Thanks Dhanalakshmi

AppLEaDaY commented 8 months ago

Thanks, Dhanalakshmi!

I already tried with Redmine 5.0.6 but I don't know with what version for ERPmine since the only reference that I found for that is the file README.rdoc, where I read Release Notes for v4.5: is 4.5 the version, then? Going by what you wrote I may not care about the ERPmine version initially, since I have first to upgrade ERPmine. If that is the case, I'm anyway stuck at the error message I get while upgrading Redmine. LoadError: cannot load such file -- timelogcontroller_patch This message is got upon launching one of the command suggested for the upgrade of Redmine. bundle exec rake db:migrate RAILS_ENV=production Isn't that error related to the ERPmine module installed? I see a timelogcontroller_patch.rb file in plugins/redmine_wktime/lib...

Thanks in advance!

Andrea

cdhana17 commented 8 months ago

You haven’t answered if Erpmine 4.5 was working fine in Redmine 4.2.3.

If it was working you can get the version from Administration —> plugins

Screenshot 2023-11-07 at 10 06 57 AM

Anyway, if you are not that particular about Erpmine, just backup the folder plugins/redmine_wktime and then remove it. Then try to upgrade Redmine, it should go through fine

Thanks Dhanalakshmi

AppLEaDaY commented 8 months ago

Hi, Dhanalakshmi.

Apparently you did not ask me before whether Erpmine 4.5 was working fine in Redmine 4.2.3.

image

I don't know if reading the version is enough to tell the plugin is working fine. At the moment it is not used. Anyway I just discovered if I click on the ERPmine link on the topbar (the value of href is /wkdashboard/index) I'm redirected to /login with a "back_url" parameter in the query string and a value corresponging to "/wktime/index" (I'm omitting the protocol and host parts). The outcome is a NS_ERROR_REDIRECT_LOOP and a message from Mozilla Firefox telling "The page isn’t redirecting properly" and "This problem can sometimes be caused by disabling or refusing to accept cookies.". I'm logged in as administrator.

Anyway if I'm not wrong you suggested me to uninstall ERPmine before upgrading Redmine. On this regard on a Redmine wiki page I read I may need to run the command below. bundle exec rake redmine:plugins:migrate NAME=redmine_wktime VERSION=0 RAILS_ENV=production This should be needed if the plugin required a migration: did it require a migration? Anyway if I launch that command I get the same error seen before. LoadError: cannot load such file -- timelogcontroller_patch So I tried to just remove the redmine_wktime directory. This time I could successfully launch the command below. bundle exec rake db:migrate RAILS_ENV=production I went on with the instructions on the page at the URL below. https://www.redmine.org/projects/redmine/wiki/redmineupgrade The problem now is if I call the website with the browser I get the file listing in the virtual host directory and not the Redmine instance. Below is a screenshot for the configuration on the shared hosting (on cPanel).

image

What did I wrong?

Thanks in advance!

Andrea

cdhana17 commented 8 months ago

This might be a Apache or a file mapping /handler issue, please check the redmine support pages

Thanks Dhanalakshmi