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

imap-backup do not start on Ubuntu 22.04 #138

Closed
Rudiberto opened this issue Dec 11, 2022 · 4 comments
Closed

imap-backup do not start on Ubuntu 22.04 #138

Rudiberto opened this issue Dec 11, 2022 · 4 comments

Comments

@Rudiberto
Copy link

I'm messed up.
When I updated to Ubuntu 22.04 (Mint 21) my imap-backup stopped to work. At first, I downloaded the last version from here, then I installed the last version of imap-backup using "gem install". ERRORS
Then I uninstalled all up to ruby on my pc, deleted manually all old versions of gem in all folders and began a clean installation of ruby.
But after all: Starting imap-backup I'm still receiving this horror list of error messages

imap-backup <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:160:in require': cannot load such file -- mail/indifferent_hash (LoadError)
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:160:in rescue in require' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:149:in require'
from /var/lib/gems/3.0.0/gems/mail-2.8.0/lib/mail.rb:14:in <module:Mail>' from /var/lib/gems/3.0.0/gems/mail-2.8.0/lib/mail.rb:3:in <top (required)>'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/email/mboxrd/message.rb:2:in <top (required)>' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/serializer.rb:3:in <top (required)>'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup.rb:10:in <top (required)>' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/cli/helpers.rb:1:in <top (required)>'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/cli.rb:8:in <class:CLI>' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/cli.rb:7:in module:Backup'
from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/cli.rb:6:in <top (required)>' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/bin/imap-backup:8:in <top (required)>'
from /usr/local/bin/imap-backup:25:in load' from /usr/local/bin/imap-backup:25:in

'
internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require': cannot load such file -- mail/indifferent_hash (LoadError) from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from /var/lib/gems/3.0.0/gems/mail-2.8.0/lib/mail.rb:14:in <module:Mail>' from /var/lib/gems/3.0.0/gems/mail-2.8.0/lib/mail.rb:3:in <top (required)>'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/email/mboxrd/message.rb:2:in <top (required)>' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/serializer.rb:3:in <top (required)>'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup.rb:10:in <top (required)>' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/cli/helpers.rb:1:in <top (required)>'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/cli.rb:8:in <class:CLI>' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/cli.rb:7:in module:Backup'
from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/cli.rb:6:in <top (required)>' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/bin/imap-backup:8:in <top (required)>'
from /usr/local/bin/imap-backup:25:in load' from /usr/local/bin/imap-backup:25:in '
`
imap-backup worked properly for nearly a year on this pc and now such a mess. All the folder exist. When I'm starting imap-backup with sudo, the list is a lot shorter:

sudo imap-backup /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/cli/helpers.rb:68:in load_config': Configuration file '/root/.imap-backup/config.json' not found (Imap::Backup::ConfigurationNotFound)
from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/cli/backup.rb:15:in run' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/cli.rb:58:in backup'
from /var/lib/gems/3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in run' from /var/lib/gems/3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in invoke_command'
from /var/lib/gems/3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in dispatch' from /var/lib/gems/3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in start'
from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/bin/imap-backup:12:in block in <top (required)>' from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/lib/imap/backup/logger.rb:34:in sanitize_stderr'
from /var/lib/gems/3.0.0/gems/imap-backup-8.0.1/bin/imap-backup:11:in <top (required)>' from /usr/local/bin/imap-backup:25:in load'
from /usr/local/bin/imap-backup:25:in <main>'

Here is the only thing I understand: The json config file is not there, because it is in my home folder, of course. When I copied the whole .imap-backup-Folder to root-Folder, it worked right away and transformed all boxes metadata to the Version 3 Format.
Does that mean, that from now on, I have to execute imap-backup with sudo rights and configuration file stored in root-Folder?
That's not good for my needs. Don't like to execute usual programs in root mode. Also don't like to make a user-install into my home folder.
What is to do, to have the former behavior back?

@joeyates
Copy link
Owner

Hi @Rudiberto

Thanks for reporting this issue.

It is caused by release 2.8.0 of the 'mail' gem.

Here's the GitHub issue.

There's no need to switch to running imap-backup as root.

As a quick fix, you can do this:

sudo chmod o+r /var/lib/gems/3.0.0/gems/mail-2.8.0/lib/*.rb

I'll release an update to imap-backup with a fix later today.

@joeyates
Copy link
Owner

I've released version 8.0.2.

@Rudiberto, let me know whether it fixes your problem.

@Rudiberto
Copy link
Author

Rudiberto commented Dec 12, 2022

Seems to work great! Thx a lot!
At first, it seems not to work - had the certificate hash running over the screen and stopped it - but the second intent worked fine. After a reboot, it's still well.
Great job! Thank you for your great and REALLY fast reply.

@joeyates
Copy link
Owner

Glad that's sorted out!

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

No branches or pull requests

2 participants