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

Gemfile.lock blocks all installations and upgrades #367

Open
SuperSajuuk opened this issue Aug 22, 2021 · 2 comments
Open

Gemfile.lock blocks all installations and upgrades #367

SuperSajuuk opened this issue Aug 22, 2021 · 2 comments

Comments

@SuperSajuuk
Copy link

SuperSajuuk commented Aug 22, 2021

Hello. The Gemfile.lock requirement is now blocking all installation and upgrade of Staytus. It is specifying a version of mimemagic that has been removed because of licensing issues. Attempting to use the last oldest version [0.3.7] does not work because editing the lock file to fix the version issue causes this error to be thrown:

Downloading mimemagic-0.3.7 revealed dependencies not in the API or the lockfile (nokogiri (~> 1.11.2)).
Either installing with `--full-index` or running `bundle update mimemagic` should fix the problem.

Using either command still fails to work, either with the same error message or other random issues that are blocking bundle commands from completing.

At this point, without guidance on how to correct this problem, I cannot start my Staytus instance any more, as I'm coming across the issue after having upgraded to Ruby 2.7 from 2.4

@SuperSajuuk
Copy link
Author

SuperSajuuk commented Aug 22, 2021

For anyone reading this who wants a fix, do the following: I recommend only doing this if you feel confident making changes!

  1. Run the following command after using cd to wherever you have installed Staytus on your machine: git pull origin master
  2. Delete the Gemfile.lock, you will remake it in a minute using commands.
  3. Use a text editor to edit the Gemfile file.
  4. In the file, add the following statements:
gem 'mimemagic', '~> 0.3.7'
gem 'nokogiri', '~> 1.11.2'
  1. Save the file.
  2. At this point, if you try to do bundle commands, you will get errors about files being changed. To fix this, go to .bundle and edit the config file.
  3. Change "BUNDLE_DEPLOYMENT" from true to false. Save the file.
  4. Run git commit -a -m "your message". This will update your local copy of the pulled origin which bundle commands seem to rely upon.
  5. Run bundle install --without development:test. If you put deployment in, the command will fail due to "changing your gemfile". If this command fails because of an error about being unable to find a specific bundler version, edit the Gemfile.lock to remove the "Bundled with" dependency.
  6. Once completed, run bundle normally to ensure its completed.
  7. Now run bundle exec rake staytus:build staytus:upgrade
  8. Restart your Staytus instance using whatever web server solution you are using to run it.

Why do I need to do this? Basically, as explained, the defined version of mimemagic does not exist. However, trying to use newer versions requires a specific nokogiri, which leads to an error like the above. To get around the profile, you have to specify the gem versions of nokogiri and mimemagic to use, but because you have pulled from a git origin, you have to tell your local repo copy that its up-to-date.

Hopefully the maintainer can fix this with priority, as a lot of other ruby apps have been impacted by the mimemagic issue.

@SuperSajuuk
Copy link
Author

@adamcooke i tried to ping you in the above but i broke the formatting of the post so I don't think it went through. Important that this be fixed 👍

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

1 participant