发生了什么事mimemagic?@rails activerecord 依赖于 @basecamp marcel,后者依赖于 mimemagic 0.3.2。既然 mimemagic 0.3.2 已经被猛拉,那么前进的道路是什么?
注意:升级到 Mimemagic 0.3.8 仍处于 GPL-2.0 许可之下,这在所有情况下可能并不理想。
\n我今天遇到了这个问题,这就是我最终解决该问题的方法\n
(我使用的是 MBP Catalina 10.15.7)
第 1 步:通过运行将 Gemfile.lock 更新为 mimemagic 0.3.8
\n $ brew install shared-mime-info\n $ bundle update mimemagic\n
Run Code Online (Sandbox Code Playgroud)\n(确保您要部署的系统安装了正确的库)。
\n\xe2\x9c\x85 由于此评论,Mimemagic 问题得以解决
\n第 2 步:升级纱线包
\n当我这样做时,它更新了自制程序中的所有内容,因此当我重新启动服务器时,我收到了
Your Yarn packages are out of date!\n Please run `yarn install` to update.\n
Run Code Online (Sandbox Code Playgroud)\n但是,运行$yarn install
给了我错误:
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.67.dylib\n Referenced from: /usr/local/bin/node\n
Run Code Online (Sandbox Code Playgroud)\n和
\n yarn check v1.22.10\n warning Integrity check: System parameters don\'t match\n error Integrity check failed\n error Found 1 errors.\n
Run Code Online (Sandbox Code Playgroud)\n最后通过运行解决了纱线问题
\n $ yarn --update-checksums\n
Run Code Online (Sandbox Code Playgroud)\n纱线问题已解决(感谢这篇博文)
\n步骤 3最后,brew 还将我的 Postgresql 从 12 更新到 13.2,因此我收到了
\n PG::ConnectionBad - could not connect to server: No such file or directory\n Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?\n
Run Code Online (Sandbox Code Playgroud)\n没有要删除的 PID,停止并重新启动,卸载并重新加载,启动 ctl 不起作用...最后,这有效\n通过运行检查 postgres.log
\n $ tail -n 10 /usr/local/var/log/postgres.log \n
Run Code Online (Sandbox Code Playgroud)\n最后一行显示:
\n FATAL: database files are incompatible with server\n DETAIL: The data directory was initialized by PostgreSQL version 12, which is not compatible with this version 13.2.\n
Run Code Online (Sandbox Code Playgroud)\n固定为:
\n $ brew postgresql-upgrade-database\n
Run Code Online (Sandbox Code Playgroud)\n\n
你可以拿回宝石。构建的 gem 二进制文件可能已被删除,但每个版本的提交引用仍然存在。您可以像这样使用 github commit ref 引用 gem:
# 0.3.2
gem 'mimemagic', github: 'mimemagicrb/mimemagic', ref: '3543363026121ee28d98dfce4cb6366980c055ee'
Run Code Online (Sandbox Code Playgroud)
对于其他提交参考,您可以看到此链接:
https://github.com/mimemagicrb/mimemagic/commits/0.3?after=22c06826417ed67c02b94ebc9998c24da5a03c56+69&branch=0.3
Run Code Online (Sandbox Code Playgroud)
由于 gem 本身违反了 GPL 许可证要求,gem 作者已撤回所有版本。目前,有人正在研究解决方案来制作 MIT 兼容的解决方案或解决依赖关系。
讨论: https: //github.com/rails/rails/issues/41750