ruby-on-rails - Heroku push 被拒绝错误:无法通过 Bundler 安装 gems(可能由 mimemagic 引起)
问题描述
我尝试在heroku上推送我的项目并弹出错误消息
git push heroku master
remote: -----> Building on the Heroku-18 stack
remote: -----> Using buildpack: heroku/ruby
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.2.11
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.6.3
remote: -----> Installing dependencies using bundler 2.2.11
remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
remote: Fetching gem metadata from https://rubygems.org/............
remote: **Your bundle is locked to mimemagic (0.3.5), but that version could not be found**
remote: in any of the sources listed in your Gemfile. If you haven't changed sources,
remote: that means the author of mimemagic (0.3.5) has removed it. You'll need to update
remote: your bundle to a version other than mimemagic (0.3.5) that hasn't been removed
remote: in order to install.
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/............
remote: Your bundle is locked to mimemagic (0.3.5), but that version could not be found
remote: in any of the sources listed in your Gemfile. If you haven't changed sources,
remote: that means the author of mimemagic (0.3.5) has removed it. You'll need to update
remote: your bundle to a version other than mimemagic (0.3.5) that hasn't been removed
remote: in order to install.
remote:
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: !
我猜这个问题是由 rails gem mimemagic 的版本过时引起的,所以我尝试更新到最新版本,它仍然无法正常工作。
这是我的 ruby,Rails,mimemagic 版本
ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
rails -v
Rails 6.1.3.1
bundle info mimemagic
* mimemagic (0.4.3)
Gemfile 中的信息
gem 'rails', '~> 6.1', '>= 6.1.0'
gem 'bundler', '~> 2.2', '>= 2.2.1.1'
gem 'mimemagic', '~> 0.4.3'
在 Gemfile.lock
mimemagic (~> 0.4.3)
解决方案
跑步bundle update mimemagic
对我有用
推荐阅读
- excel - VBA更改连接名称
- sql-server - 如何将 SQL SERVER 函数转换为 PROCEDURE
- android - 强制创建 Couchbase Lite 2.6 数据库
- dynamic - 使用 insertUI 的具有动态 bs_accordion_sidebar() 的闪亮应用
- xamarin - 使用 Refit 在 Xamarin 中请求开始失败
- java - 如何将jmeter中的参数作为变量发送?
- json - WildFly 中的 jackson-jaxrs 提供程序与 EAR 部署冲突
- python - Python双重列表理解
- python - Python。我可以通过 PyQt5 在 OpenCV 中使用 cv2.setMouseCallback() 吗?
- node.js - 当我在异步映射函数中创建数据库进程时,我无法避免重复