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

Fix broken install by updating mimemagic to 0.3.10 #2990

Closed

Conversation

goodnewz
Copy link

Mime Magic 0.3.5 has been yanked from the gem library, giving a missing dependency error when installing huginn due to the reliance on version 0.3.5. One solution is to use a mimemagic library that is more current, but this leads to additional issues due to dependencies with nokogiri. One solution is to add the above code, which resolves the dependencies and the additional issues with nokogiri.

Hat tip @y-okamoto-1113 for the solution.

Mime Magic 0.3.5 has been [yanked](rails/rails#41757 (comment)) from the gem library, giving a missing dependency error when installing huginn due to the reliance on version 0.3.5. One solution is to use a mimemagic library that is more current, but this leads to additional issues due to dependencies with nokogiri. One solution is to add the above code, which resolves the dependencies and the additional issues with nokogiri. 

Hat tip [@y-okamoto-1113](mimemagicrb/mimemagic#98 (comment)) for the solution.
@Azunyan-
Copy link

Your fix doesn't fix the problem fully for me when trying to install.

Downloading mimemagic-0.3.10 revealed dependencies not in the API or the lockfile (nokogiri (~> 1), rake (>= 0)).
Either installing with `--full-index` or running `bundle update mimemagic` should fix the problem.```

I have sadly not installed huginn before so this could be me being a total noob.

@goodnewz
Copy link
Author

I wonder if this has something to do with the ruby version? I am using 2.7.2. Total speculation on my part as this is the first time I am installing huginn on my system as well. This worked on my Debian system but it seems like you the automated docker image ran into the same problem. I used to get this exact same message before I added the following sublines which fixed it for me:

nokogiri (~> 1)
rake 

I will keep investigating.

Your fix doesn't fix the problem fully for me when trying to install.

Downloading mimemagic-0.3.10 revealed dependencies not in the API or the lockfile (nokogiri (~> 1), rake (>= 0)).
Either installing with `--full-index` or running `bundle update mimemagic` should fix the problem.```

I have sadly not installed huginn before so this could be me being a total noob.

@goodnewz
Copy link
Author

P.S. The one thing I can think of is to try using mimemagic (0.4.3) instead of 0.3.10.

@Azunyan-
Copy link

P.S. The one thing I can think of is to try using mimemagic (0.4.3) instead of 0.3.10.

Sadly didn't fix it.

Fetching mimemagic 0.4.3
Downloading mimemagic-0.4.3 revealed dependencies not in the API or the lockfile (nokogiri (~> 1), rake (>= 0)).
Either installing with `--full-index` or running `bundle update mimemagic` should fix the problem.

I am running Ruby 2.6.5 which the install guide on the wiki says to do but I guess I will try doing this all again but just installing the most new version of Ruby available and will hopefully get better results.

@virtadpt
Copy link
Collaborator

It could be. I'm not seeing it with v2.6.3p62 or v2.7.2p137, though.

@Azunyan-
Copy link

It could be. I'm not seeing it with v2.6.3p62 or v2.7.2p137, though.

I've installed Ruby 2.7.3 now and it is actually installing huginn now.
The installation guide on the wiki should probably get a new link as to which ruby version to build.

@goodnewz
Copy link
Author

After a bit more testing I am realizing my method is probably not the best way to actually tackle this problem.

The proper way to tackle this is similar to how #2980 has tackled it (minus the docker file modifications). You would need to modify the Gemfile since the dependency for mimemagic actually comes from the rails version.

What I have done is update rails to 6.0.3.6 from 6.0.3.1 along with two other packages (foreman and mini_racer). See the photos below. I added the additional packages because I had another issue ( #2956 ) unrelated to this. One fix was to update foreman. Sadly this didn't fix #2956.

image

image

Then you delete the Gemfile.lock and run

bundle config set --local without 'development test'
bundle install --no-deployment

@goodnewz
Copy link
Author

It could be. I'm not seeing it with v2.6.3p62 or v2.7.2p137, though.

I've installed Ruby 2.7.3 now and it is actually installing huginn now.
The installation guide on the wiki should probably get a new link as to which ruby version to build.

You are correct. I remember seeing a pr about it but I can't find it now. Ruby less than 2.5 is not supported.

@knu
Copy link
Member

knu commented Dec 16, 2021

This is already done on the master branch. Thanks!

@knu knu closed this Dec 16, 2021
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

Successfully merging this pull request may close these issues.

None yet

4 participants