簡體   English   中英

Heroku 在成熟應用中拒絕推送(pre-receive hook 被拒絕)

[英]Heroku rejecting push in mature application (pre-receive hook declined)

我越來越

   FAILED: http://devcenter.heroku.com/articles/bundler

, Heroku 推送被拒絕。 無法通過 Bundler 安裝 gem 到 git@heroku:com...: 。 [remote denied] master -> master (pre-receive hook denied) 錯誤。 未能將一些參考推送到…………..(完整列表見底部)

這是一個當前在 heroku 上工作的應用程序,但 heroku 不允許 git 將 Z3115FB34DFCB5BA87336 更新到主代碼。

但是,如果我將代碼克隆到一個新文件夾並執行 heroku 創建以使用種子數據創建一個新應用程序,則新應用程序可以正常工作。 但是,我不想使用新應用程序,因為我有關於我想要保留的功能應用程序的數據。

現有應用程序或 gem 上似乎有一些東西拒絕更新。 我認為數據不會阻止 gem 的安裝,所以我不知道該怎么做。

建議?

“Heroku 推送被拒絕,無法通過 Bundler 安裝 gems”是否意味着問題出在更新 gem 中,或者這是一個紅鯡魚?

謝謝。

$ git push heroku master 計數對象:536,完成。 Delta 壓縮最多使用 2 個線程。 壓縮對象:100% (125/125),完成。 寫入對象:100% (391/391),1.08 MiB,完成。 總計 391(增量 262),重復使用 373(增量 251)

-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
       Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
       Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
       Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
       Unresolved dependencies detected; Installing...
       Using --without development:test
       Windows Gemfile.lock detected, ignoring it.
       You have modified your Gemfile in development but did not check
       the resulting snapshot (Gemfile.lock) into version control
   You have added to the Gemfile:
   * source: rubygems repository http://rubygems.org/
   * rails (= 3.0.5)
   * haml
   * haml-rails
   * sqlite3-ruby
   * devise (= 1.1.5)
   * omniauth
   * declarative_authorization
   * will_paginate (= 3.0.pre2)
   * nifty-generators
   * acts-as-taggable-on
   * acts_as_commentable
   * aws-s3
   * jquery-rails
   * rspec-rails
   * annotate
   * faker (= 0.3.1)
   * hpricot (= 0.8.3)
   * ruby_parser
   * paperclip (~> 2.3)
   * formtastic (~> 1.2.3)
   * hirb
   * kaminari
   * rspec (= 2.5.0)
   * webrat
   * factory_girl_rails (= 1.0)
   * cucumber
   * mocha
   FAILED: http://devcenter.heroku.com/articles/bundler

, Heroku 推送被拒絕,無法通過 Bundler 安裝 gem

到 git@heroku.com:... : [remote denied] master -> master (pre-receive hook denied) 錯誤。 未能將一些裁判推到…………..

You have modified your Gemfile in development but did not check
the resulting snapshot (Gemfile.lock) into version control

這意味着您已將 gem 添加到 gemfile 中但尚未更新。 Gemfile.lock 與此文件不同步。

您需要更新您的捆綁包。

在應用程序目錄的控制台中運行此命令: bundle

然后做git push heroku

你應該對 go 很好。

**核彈應用程序並重新開始。

gem install taps #install taps
heroku db:pull   #pull your data to your local machine

rm -rf .git #remove your git repo 
git init    #create a new repo
git add .   #add all the files
git commit -m 'master' #commit as master

heroku create #create a new heroku app
heroku rename myapp #rename the app
git push heroku master #push to heroku

heroku db:push #push your data to heroku

這應該會啟動一個新應用程序。

我剛剛遇到了同樣的問題,以下為我解決了這個問題:

我有一個按要求(測試、開發等)分組的寶石組合,還有一些兩者都使用的寶石,例如

group :development do
  gem "hpricot"
  gem "ruby_parser"
  gem "haml-rails", ">= 0.3.4"
end

gem "rspec-rails", ">= 2.9.0.rc2", :group => [:development, :test]

我刪除了單行的,只是在相關的塊中復制了它們(我知道不是 DRY,但到底是什么)。

做了一個快速捆綁,嘿,我可以再次推送到 Heroku ......

根據我的閱讀,這是一個 windows 問題。

為什么 Heroku 不接受我在 Windows 中的 Gemfile.lock?

我花了幾個小時試圖弄清楚這一點,但沒有骰子。 是時候轉移到虛擬機並在那里嘗試了。 真可惜。

我遇到了同樣的錯誤,在命令行中運行以下代碼解決了它:

$ heroku 配置:設置 BUNDLE_WITHOUT="開發:測試"


我認為上述 gemfile.lock 問題是紅鯡魚。

或者,可能是 Heroku 出現 API 問題並且已關閉。 檢查https://status.heroku.com/

這發生在我今天與一個成熟的應用程序。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM