Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup NoMethodError (undefined method `file' #60

Open
redfox1993 opened this issue Jan 30, 2020 · 14 comments
Open

Backup NoMethodError (undefined method `file' #60

redfox1993 opened this issue Jan 30, 2020 · 14 comments
Assignees
Labels

Comments

@redfox1993
Copy link

Hi there,

Your plugin is great so far, but I got an error when I want to create a backup.
I am using Redmine 4.1

Started POST "/vault_settings/backup" for 192.168.50.179 at 2020-01-30 16:19:08 +0000
Processing by VaultSettingsController#backup as HTML
  Parameters: {"authenticity_token"=>"BXrm/ECyiienrnghuc4w7HPyw/nGNfCft/QIP/Eap22DFR99+gzOkeibptcVB4VZVTfGX8FPUaBRrQGnpAhJEA=="}
  Current user: admin (id=1)
Completed 500 Internal Server Error in 28ms (ActiveRecord: 9.0ms)

NoMethodError (undefined method `file' for #<Zip::File:0x00007f7479682aa0>):

plugins/vault/app/controllers/vault_settings_controller.rb:55:in `block in backup'
plugins/vault/app/controllers/vault_settings_controller.rb:54:in `backup'
lib/redmine/sudo_mode.rb:65:in `sudo_mode'
plugins/redmine_dmsf/lib/redmine_dmsf/webdav/custom_middleware.rb:68:in `call'

What can I do?
kind regards
Red

@noshutdown-ru-user
Copy link
Member

noshutdown-ru-user commented Jan 31, 2020

Thx for report, will take a look this weekends, looks some bug, pls wait a bit

@noshutdown-ru-user
Copy link
Member

This problem can be related to other plugin which is using gem zip.
Gem zip and rubyzip have same names for modules.
Can you check Gemfiles of plugins is any of them using zip ?

@redfox1993
Copy link
Author

Sorry i dont understand. I am at the beginning to understand ruby.
The error comes up, when I was trying to backup the vault.

I dont think that my other installed plugins used zip but If so, is it not possible to make using the right module in your plugin?

@noshutdown-ru-user
Copy link
Member

Can you try this branch https://github.com/noshutdown-ru/vault/tree/development

@noshutdown-ru-user
Copy link
Member

Sorry i dont understand. I am at the beginning to understand ruby.
The error comes up, when I was trying to backup the vault.

I dont think that my other installed plugins used zip but If so, is it not possible to make using the right module in your plugin?

Can you provide list of installed plugins ?

@redfox1993
Copy link
Author

redfox1993 commented Feb 3, 2020

I have changed the branch to development and pulled it.

Fast-forward
.travis.yml | 2 +-
Gemfile | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)

then bundle install.

Now I was not able to call my Redmine application.
I couldn't find any error logs, so I have pulled back to the master branch and everything was fine again.

the other plugin that uses rubyzip is the dmsf plugin.
(maybe? danmunn/redmine_dmsf#110)

@noshutdown-ru-user
Copy link
Member

Can you remove this plugin and try with master branch of vault ?
Also can you comment this strings in hist plugin https://github.com/danmunn/redmine_dmsf/blob/master/Gemfile#L23-L24 and try our master branch ?

@redfox1993
Copy link
Author

I 've commented the lines but it doesn't work, though. I'm afraid that removing the DMSF Plugin is not an option, cause of WebDAV, documents, full text, etc :(

@noshutdown-ru-user
Copy link
Member

We will try to check is it connected to this plugin https://github.com/danmunn/redmine_dmsf or something else.

@redfox1993
Copy link
Author

Hi there,
Any progress?

@noshutdown-ru-user
Copy link
Member

not yet, sorry

@noshutdown-ru-user
Copy link
Member

with old version all work ?

@redfox1993
Copy link
Author

with the old version, I can start my Redmine site. The Development branch causes a crash of my Redmine.

@noshutdown-ru-user
Copy link
Member

ok pls don't use now Development

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants