Heroku:无法通过 Bundler 安装 gem

2024-05-12

我尝试使用以下命令将我的 Rails 应用程序推送到 Herokugit push heroku master -f命令,我得到这个:

Total 0 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using 1.9.7
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        You are trying to install in deployment mode after changing
remote:        your Gemfile. Run `bundle install` elsewhere and add the
remote:        updated Gemfile.lock to version control.
remote:        You have added to the Gemfile:
remote:        * rails (= 4.2.0)
remote:        * sass-rails (= 5.0.2)
remote:        * uglifier (= 2.5.3)
remote:        * coffee-rails (= 4.1.0)
remote:        * jquery-rails (= 4.0.3)
remote:        * turbolinks (= 2.3.0)
remote:        * jbuilder (= 2.2.3)
remote:        * sdoc (= 0.4.0)
remote:        * sqlite3 (= 1.3.9)
remote:        * byebug (= 3.4.0)
remote:        * web-console (= 2.0.0.beta3)
remote:        * spring (= 1.1.3)
remote:        * pg (= 0.17.1)
remote:        * rails_12factor (= 0.0.2)
remote:        You have deleted from the Gemfile:
remote:        * byebug
remote:        * coffee-rails (~> 4.1.0)
remote:        * jbuilder (~> 2.0)
remote:        * jquery-rails
remote:        * rails (= 4.2.1)
remote:        * sass-rails (~> 5.0)
remote:        * sdoc (~> 0.4.0)
remote:        * spring
remote:        * sqlite3
remote:        * turbolinks
remote:        * uglifier (>= 1.3.0)
remote:        * web-console (~> 2.0)
remote:        Bundler Output: You are trying to install in deployment mode after changing
remote:        your Gemfile. Run `bundle install` elsewhere and add the
remote:        updated Gemfile.lock to version control.
remote:
remote:        You have added to the Gemfile:
remote:        * rails (= 4.2.0)
remote:        * sass-rails (= 5.0.2)
remote:        * uglifier (= 2.5.3)
remote:        * coffee-rails (= 4.1.0)
remote:        * jquery-rails (= 4.0.3)
remote:        * turbolinks (= 2.3.0)
remote:        * jbuilder (= 2.2.3)
remote:        * sdoc (= 0.4.0)
remote:        * sqlite3 (= 1.3.9)
remote:        * byebug (= 3.4.0)
remote:        * web-console (= 2.0.0.beta3)
remote:        * spring (= 1.1.3)
remote:        * pg (= 0.17.1)
remote:        * rails_12factor (= 0.0.2)
remote:
remote:        You have deleted from the Gemfile:
remote:        * byebug
remote:        * coffee-rails (~> 4.1.0)
remote:        * jbuilder (~> 2.0)
remote:        * jquery-rails
remote:        * rails (= 4.2.1)
remote:        * sass-rails (~> 5.0)
remote:        * sdoc (~> 0.4.0)
remote:        * spring
remote:        * sqlite3
remote:        * turbolinks
remote:        * uglifier (>= 1.3.0)
remote:        * web-console (~> 2.0)
remote:  !
remote:  !     Failed to install gems via Bundler.
remote:  !
remote:
remote:  !     Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy....
remote:
remote: !   Push rejected to theorderapp.
remote:
To https://git.heroku.com/theorderapp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/theorderapp.git'

我试着bundle update and bundle install再次运行git push heroku master -f但它仍然不起作用。

我还尝试删除我的 Gemfile.lock 文件,运行bundle update and bundle install again, git add and git commit它并运行git push heroku master -f但它也不适合我。

顺便说一句,这是我的 Gemfile:

source 'https://rubygems.org'

gem 'rails',            '4.2.0'
gem 'bootstrap-sass',   '3.2.0.0'
gem 'sass-rails',       '5.0.2'
gem 'uglifier',         '2.5.3'
gem 'coffee-rails',     '4.1.0'
gem 'jquery-rails',     '4.0.3'
gem 'turbolinks',       '2.3.0'
gem 'jbuilder',         '2.2.3'
gem 'sdoc',             '0.4.0', group: :doc
gem 'font-awesome-sass'

group :development, :test do
  gem 'sqlite3',     '1.3.9'
  gem 'byebug',      '3.4.0'
  gem 'web-console', '2.0.0.beta3'
  gem 'spring',      '1.1.3'
end

group :production do
  gem 'pg',             '0.17.1'
  gem 'rails_12factor', '0.0.2'
end

这是我的 .gitignore 文件:

# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
#   git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal

# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/tmp

按照步骤操作 -

步骤 1:手动或通过以下命令从项目中删除 Gemfile.lock -

rm -rf ~/.bundle/ ~/.gem/ .bundle/ Gemfile.lock

第 2 步:然后bundle install

Step 3: git add .

Step 4: git commit -m "commiting Gemfile.lock"

Step 5: git push heroku master -f

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Heroku:无法通过 Bundler 安装 gem 的相关文章

  • 更新系统后RubyGems错误

    使用 sudo gem update system 更新 ruby 设置后尝试启动 Rails 控制台时 我尝试通过发出以下命令来执行 Rails 控制台rails c 我收到此错误 Users myusername rvm rubies
  • 对构建过程依赖于与另一个容器通信的应用程序进行 Docker 化

    我有一个 Ruby on Rails 应用程序 我正在尝试对其进行容器化 以便可以使用 Docker 进行部署 version 3 4 services db image postgres web container name my rai
  • 不理解 Ruby ljust/rjust/center 方法

    我正在学习嵌套 我的任务是使每条新行都以缩进开头 这是我的代码 但它不起作用 nestingDepth 0 def logger description block puts Beginning description rjust nest
  • 装饰 Rails 中的属性

    我有一个name上的属性Person模型 每次我访问name属性 我想要name capitalize被退回 在模型内执行以下操作将不起作用 def name name capitalize end 那么还有什么选择呢 我建议您使用自定义格
  • 黄瓜测试java例子?

    我想尝试使用黄瓜测试的示例应用程序 黄瓜测试可以仅使用 ruby 完成 也可以使用 java 完成 请帮我举一个示例 谢谢 您可以查看我们在我们这里编写的一个简单示例来演示 cucumber jvm https github com gph
  • Rails 中的“class << self”是什么意思? [复制]

    这个问题在这里已经有答案了 可能的重复 Ruby 中的 class https stackoverflow com questions 2505067 class self idiom in ruby有人可以向我解释一下 class htt
  • 如何验证单选按钮?

    我的 Rails 应用程序中有一个单选按钮 我想编写一个 java 脚本代码 在未选择任何选项时验证这一点 在你的 votes 类中做类似的事情 class Myvotes lt ActiveRecord Base validates vo
  • Capistrano 3 部署无法连接到 GitHub - 权限被拒绝(公钥)

    我使用 Capistrano v3 和 capistrano symfony gem 设置了以下部署脚本 我正在使用 Ubuntu 14 4 部署到 AWS EC2 实例 我正在连接从 AWS 下载的 pem 文件 我的deploy rb中
  • Rails“where”方法通过子属性查找父级

    我有一个 Rails 应用程序 我试图根据子类的日期创建父类的列表 现在我有 orders Order where order reminders date lt 1 month from now 但我收到一个错误 没有这样的列 order
  • jRails 是 Rails + jQuery 必须的吗?

    我是rails新手 使用rails 2 3 10 并且想使用jquery 特别是jquery ui 该项目是一个全新的项目 我计划使用 jquery ui 中的一些小部件 如 datapicker 和 selectable 等 我听说可以安
  • 在 (Mac)Vim 中查看 ri 时摆脱 ANSI 转义字符

    我在 gvim 和 MacVim 中查看 ri 文档时遇到问题 在两者上都尝试过 一些 ri 文档包含在终端窗口中查看时看起来不错的文本装饰 但在 gvim MacVim 中查看时包含 ANSI 转义字符 例如 以下 ri 片段来自 ri
  • rspec 测试 has_many :through 和 after_save

    我有一个 我认为 相对简单的has many through与连接表的关系 class User lt ActiveRecord Base has many user following thing relationships has ma
  • 使 case/switch 返回值的快捷方式

    我很确定我看到有人做了像下面的代码这样的快捷技术 这不起作用 return case guess when guess gt answer then high when guess lt answer then low else corre
  • 合并两个ActiveRecord数组并按created_at排序

    books Book find all articles Articles find all 通过阅读来自http guides rubyonrails org layouts and rendering html http guides
  • 从 Ruby on Rails 3.2.6 中的 Paperclip 生成的文件中删除问号

    我正在使用 Paperclip FFMPEG 将视频文件上传到我的开发环境 并最终在我的项目投入生产时上传到本地服务器 视频上传时 默认文件名如下 system modelnames paperclipnames mynewfile mp4
  • Production.log 中没有日志消息

    我编写了一个演示 HelloWorld Rails 应用程序并使用 WEBrick 对其进行了测试 它甚至不使用数据库 它只是一个打印 hello world 的控制器 然后我尝试将其部署到由 Passenger 驱动的本地 Apache
  • Rails Structure.sql 和 schema.rb 之间有什么区别

    我知道 schema rb 文件是一个 ruby 文件 它是在运行 rake 迁移时创建和修改的 但是 Structure sql 呢 我在一些项目中看到了 schema rb 在其他项目中看到了 Structure sql 以及在一些这两
  • Rails 4 中如何使用 attr_accessible?

    attr accessible似乎不再在我的模型中工作 Rails 4 中允许批量分配的方法是什么 Rails 4 现在使用参数强 http edgeapi rubyonrails org classes ActionController
  • 推送更改到 Git 不起作用

    每次我想要提交命令 git push heroku master 时 系统都会要求我在 PowerShell 中输入凭据 当我输入 heroku 凭据 默认情况下连接到 git 时 我收到错误消息 但是 当我输入我的主目录中的 netrc
  • 如何检查用户电子邮件的唯一性并将结果传递给 jQuery?

    我有这个问题 我正在控制器中检查用户电子邮件并发送 json 成功响应 如果已获取 并添加输入的 css 样式 我还需要阻止提交并添加一些消息 这是我的检查电子邮件操作 使用本文 http paydrotalks com posts 45

随机推荐

  • 动态 GraphQL 模式?

    我有一个突变 将提交表单数据 该数据可能会根据您填写的表单而有所不同 表单将会很多 并且它们将共享相同的 步骤 每个表单由 1 个或多个页面 步骤组成 因此 我们可能有这些可重用的步骤 最喜欢的水果 出生日期 名和姓 还有这两种形式 通用信
  • 如何在 Swift 中编写 Cordova 插件?

    我将现有的自定义插件转换为 Swift 语言 位于Plugins CustomPluginInSwift swift import Foundation class CustomPluginInSwift CDVPlugin func ge
  • 正在搜索 Mercurial 存储库 (TortoiseHG)?

    有什么方法可以输入特定的文件名 例如 xyz txt 并使用 TortoiseHG 在 Mercurial 存储库中搜索该文件的任何签入 如果没有 为什么不呢 这不就是版本控制的用途吗 在 Hg Repository Explorer 窗口
  • SpringMVC form:options items 属性:它到底期望什么?

    我对 SpringMVC 以及 jstl 来说 还是个新手 我正在尝试填充从对象列表中选择的选项 我找到了一种使用 c forEach 来做到这一点的方法 但我一直认为必须有一种方法可以使 form options 方法起作用 我浏览了一下
  • 是否可以在 VC++/CLI 中重写 IEnumerable?

    我有一个返回一个的接口IEnumerable 我想在 VC CLI 中实现这个 因为数据来自第三方非托管 DLL 到目前为止我有 public ref class MyEnumerable IEnumerable
  • netbeans - 调试器退出,代码为 0xc0000135

    我需要在 netbeans 中安装调试器 我已经在 mingw bin 目录中安装了 gdbmingw get exe install gdb 我已经添加了该行C MinGW bin gdb exe 但是 当我运行调试器时 它会给出以下消息
  • 在 UILongPressGestureRecognizer 上,如何检测哪个对象生成了事件?

    我有几个 UIButton 的视图 我已成功使用 UILongPressGestureRecognizer 实现 并使用以下内容作为选择器 void longPress UILongPressGestureRecognizer gestur
  • cmake:设置多个项目以及它们之间的依赖关系

    我需要帮助为 C 项目编写一个好的 CMakeLists txt 我寻找答案 但我发现了什么 这是我的项目结构 MainProj ProjLib include proj lib h src proj lib cc CMakeLists t
  • LazyColumn - Items 关键参数的用途?

    有人可以解释一下它的主要目的是什么吗 key LazyListScope 的 items itemsIndexed 函数内的参数 如果我们指定该参数 我们会得到什么或不会得到什么 我不确定我是否理解与此参数相关的官方文档 key 代表该项目
  • C++中的虚继承是什么

    假设我有这样的代码 class A class B virtual public A class C virtual public A class D public B public C virtual public A If D继承B a
  • 导入 python 模块的特殊性?

    我一直在使用 python 的 PySerial 库pyserial API http pyserial sourceforge net pyserial api html 我似乎无法理解为什么我必须专门导入模块的某个部分 这会给我一个错误
  • 为 Eclipse 安装 Mercurial 插件时出错

    我刚刚为 Eclipse 安装了一个 Mercurial 插件 安装过程很顺利 但是安装后 当我重新启动 eclipse 时 显示错误 错误说 发生了多个 Mercurial 错误 请检查错误日志视图以获取详细信息 命令行 hg y deb
  • Twilio webRTC 通话在 10 分钟后中断

    使用 Twilio js 使用 webRTC 录制通话 工作正常 但在 10 分钟时 完全正确 电话挂断 TwiML 上的最大记录时间设置为 7200 秒 浏览器的控制台显示 Twilio PeerConnection signalingS
  • 让按钮更容易点击

    我有一个按钮 在某些手机上由于尺寸太大而很难点击 但让它变大会破坏布局 可以向视图解释它有一个比其可见区域更大的 点击框 吗 不确定这是否有帮助 如果您使用没有背景的 ImageButton 并设置 Padding 值 您的按钮将具有更大的
  • 如何在 Bootstrap 4 中隐藏和替换 navbar-toggler-icon?

    如何隐藏和替换 Bootstrap 4 中的导航栏切换图标 现在 下面的代码只是将 X 放在汉堡菜单下方
  • 是否可以共享 Symfony2 安装(一台服务器上的多个网站 [域])

    我想在一个根 服务器 下托管多个基于 Symfony2 的网站 是否可以共享 symfony 自己的文件 供应商等 有人知道教程吗 管理起来困难吗 AFAIK Symfony 安装大约有 600MB 我不想以冗余方式保存它 我看起来确实有可
  • ModuleNotFoundError:没有名为“pdfminer.high_level”的模块

    我在 pycharm 中从事项目 我想使用 pdfminer 将 pdf 文件转换为文本文件 我的问题是 当我运行该应用程序时 它无法工作 并且显示此错误消息 ModuleNotFoundError 没有名为 pdfminer high l
  • JS - 不可破坏空间的转换   [关闭]

    很难说出这里问的是什么 这个问题是含糊的 模糊的 不完整的 过于宽泛的或修辞性的 无法以目前的形式得到合理的回答 如需帮助澄清此问题以便重新打开 访问帮助中心 help reopen questions 我正在从 HTML 元素中读出文本并
  • 确保 config.h 包含一次

    我有一个库项目 正在使用 Linux 中的 autotools 套件移植到该项目 我对自动工具很陌生 本周 我已经了解了其操作的基础知识 我有一个关于如何保留内容的问题config h免遭重新定义 我惊讶地发现生成的config h文件也没
  • Heroku:无法通过 Bundler 安装 gem

    我尝试使用以下命令将我的 Rails 应用程序推送到 Herokugit push heroku master f命令 我得到这个 Total 0 delta 0 reused 0 delta 0 remote Compressing so