问题描述
我知道这个问题已经出现在SA上了,但是,没有什么可以为我解决这个问题。我了解这只是表明我的gemfile和gemfile.lock文件不同步。删除gemfile.lock文件并重新捆绑应该可以解决此问题。我尝试了许多尝试来调整我的gemfile,提交和推送---但没有任何效果。熟悉此heroku堆栈跟踪的人可以提供一些指导吗?
I know this question appears on SA already---but, nothing is resolving this issue for me. I understand that this simply indicates that my gemfile and gemfile.lock file are out of sync. Removing the gemfile.lock file and re-bundling should resolve this. I have tried a number of attempts at tweaking my gemfile, commit, and pushing---but, nothing has worked. Anyone familiar with this heroku stack-trace who can offer some guidance? This changed for me suddenly.
尝试:
- remove gemfile.lock and bundle install
- update bundler
- remove older versions of multiple installed gems
-
git push heroku
Counting objects: 41, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (40/40), done.
Writing objects: 100% (41/41), 5.64 KiB | 0 bytes/s, done.
Total 41 (delta 27), 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.3.1
remote: -----> Installing dependencies using bundler 1.13.6
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: The git source `git://github.com/rails/sprockets-rails.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: The git source `git://github.com/sinatra/sinatra.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: The git source `git://github.com/jonatack/will_paginate.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: The git source `git://github.com/kesha-antonov/simple_form.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: The git source `git://github.com/sonalkr132/spring.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
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: * source: git://github.com/jonatack/will_paginate.git (at master)
remote: * source: git://github.com/kesha-antonov/simple_form.git (at rails-5-0)
remote: * source: git://github.com/rails/sprockets-rails.git (at master)
remote: * source: git://github.com/sinatra/sinatra.git (at master)
remote: * source: git://github.com/sonalkr132/spring.git (at bundler-dep)
remote: You have deleted from the Gemfile:
remote: * source: https://github.com/jonatack/will_paginate.git (at master@3c86149)
remote: * source: https://github.com/kesha-antonov/simple_form.git (at
remote: rails-5-0@a1561c9)
remote: * source: https://github.com/rails/sprockets-rails.git (at master@6fa795a)
remote: * source: https://github.com/sinatra/sinatra.git (at master@63e81bc)
remote: * source: https://github.com/sonalkr132/spring.git (at bundler-dep@0caed19)
remote: Bundler Output: The git source `git://github.com/rails/sprockets-rails.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: The git source `git://github.com/sinatra/sinatra.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: The git source `git://github.com/jonatack/will_paginate.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: The git source `git://github.com/kesha-antonov/simple_form.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
remote: The git source `git://github.com/sonalkr132/spring.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
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:
remote: You have added to the Gemfile:
remote: * source: git://github.com/jonatack/will_paginate.git (at master)
remote: * source: git://github.com/kesha-antonov/simple_form.git (at rails-5-0)
remote: * source: git://github.com/rails/sprockets-rails.git (at master)
remote: * source: git://github.com/sinatra/sinatra.git (at master)
remote: * source: git://github.com/sonalkr132/spring.git (at bundler-dep)
remote:
remote: You have deleted from the Gemfile:
remote: * source: https://github.com/jonatack/will_paginate.git (at master@3c86149)
remote: * source: https://github.com/kesha-antonov/simple_form.git (at
remote: rails-5-0@a1561c9)
remote: * source: https://github.com/rails/sprockets-rails.git (at master@6fa795a)
remote: * source: https://github.com/sinatra/sinatra.git (at master@63e81bc)
remote: * source: https://github.com/sonalkr132/spring.git (at bundler-dep@0caed19)
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to xxxxxx.
remote:
To [email protected]:xxxxxx.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:xxxxxx.git'
推荐答案
大多数答案只是表明要删除gemfile.lock并运行捆绑包安装。但是---出现了一条有关https的捆绑程序的新消息:
Most answers simply indicate to delete gemfile.lock and run bundle install. However---there is a new message popping up bundler regarding https:
The git source `X` uses the `git` protocol, which transmits data without
encryption. Disable this warning with `bundle config git.allow_insecure true`,
or switch to the `https` protocol to keep your data secure.
在消息提示后,在〜/ .bundle / config中创建了一个新的配置文件。该文件导致了heroku的麻烦—-删除它使我重新开始工作。
following the message prompt created a new config file in ~/.bundle/config. This file was causing hell with heroku---deleting it got me back to work.
不幸的是,heroku的堆栈跟踪没有给出解决此问题的真正方向。出于多种原因,您可能会看到更改了Gemfile之后,您试图在部署模式下进行安装的消息-而且,heroku并没有提供任何帮助来帮助您弄清为什么它不满意。
Unfortunately, heroku's stack trace offers no real direction in sorting this out. There are a number of reasons you could see the "You are trying to install in deployment mode after changing your Gemfile" message---and, heroku offers nothing in helping you figure out why it is unhappy.
这篇关于如何解决heroku“您在更改Gemfile之后尝试在部署模式下安装”错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!