heroku-toolbelt - 上传到heroku导致错误

标签 heroku-toolbelt

每次我尝试使用 git push heroku master 将我的项目推送到 Heroku 时,我都会收到以下响应。我有一台 MacBook Air OSX-10.8。

    -----> Ruby app detected
    -----> Compiling Ruby/Rails
    -----> Using Ruby version: ruby-2.0.0
    -----> Installing dependencies using Bundler version 1.3.2
           New app detected loading default bundler cache
           Running: bundle install --without development:test --path vendor/bundle --binstubs  vendor/bundle/bin --deployment
           Fetching gem metadata from https://rubygems.org/..........
           Fetching gem metadata from https://rubygems.org/..
           Fetching git://github.com/thomas-mcdonald/bootstrap-sass.git
           fatal: Could not parse object '9c6c07f74ff515cf38380b014cfede14a4f0eae4'.
           Git error: command `git reset --hard 9c6c07f74ff515cf38380b014cfede14a4f0eae4`
           in directory
           /tmp/build_260d9aa7-1d8e-4738-b10f-    fce9113dd86e/vendor/bundle/ruby/2.0.0/bundler/gems/bootstrap-sass-9c6c07f74ff5
           has failed.
           If this error persists you could try removing the cache directory
           '/tmp/build_260d9aa7-1d8e-4738-b10f-fce9113dd86e/vendor/bundle/ruby/2.0.0/cache/bundler/git/bootstrap-sass-33efd1d8ffb6176fdb805029a30f02a6edfbae2e'
           Bundler Output: Fetching gem metadata from https://rubygems.org/..........
           Fetching gem metadata from https://rubygems.org/..
           Fetching git://github.com/thomas-mcdonald/bootstrap-sass.git
           fatal: Could not parse object '9c6c07f74ff515cf38380b014cfede14a4f0eae4'.
           Git error: command `git reset --hard 9c6c07f74ff515cf38380b014cfede14a4f0eae4`
           in directory
           /tmp/build_260d9aa7-1d8e-4738-b10f-fce9113dd86e/vendor/bundle/ruby/2.0.0/bundler/gems/bootstrap-sass-9c6c07f74ff5
       has failed.
       If this error persists you could try removing the cache directory
       '/tmp/build_260d9aa7-1d8e-4738-b10f-fce9113dd86e/vendor/bundle/ruby/2.0.0/cache/bundler/git/bootstrap-sass-33efd1d8ffb6176fdb805029a30f02a6edfbae2e'
 !
 !     Failed to install gems via Bundler.
 !

 !     Push rejected, failed to compile Ruby app

To <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d6b1bfa296beb3a4b9bda3f8b5b9bb" rel="noreferrer noopener nofollow">[email protected]</a>:fierce-taiga-8706.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="22454b56624a47504d49570c414d4f" rel="noreferrer noopener nofollow">[email protected]</a>:fierce-taiga-8706.git'

这是我的 git Remote

heroku  <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="65020c11250d00170a0e104b060a08" rel="noreferrer noopener nofollow">[email protected]</a>:sheltered-crag-6550.git (fetch)
heroku  <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c8afa1bc88a0adbaa7a3bde6aba7a5" rel="noreferrer noopener nofollow">[email protected]</a>:sheltered-crag-6550.git (push)
origin  <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4b2c223f0b2c223f233e2965282426" rel="noreferrer noopener nofollow">[email protected]</a>:TheM00se/Pinteresting.git (fetch)
origin  <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7c1b15083c1b150814091e521f1311" rel="noreferrer noopener nofollow">[email protected]</a>:TheM00se/Pinteresting.git (push

这是我的 Gemfile

source 'https://rubygems.org'



gem 'rails', '4.0.1'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'bootstrap-sass', github: 'thomas-mcdonald/bootstrap-sass', branch: '3'

group :doc do
  gem 'sdoc', require: false
end

group :development, :test do
     gem 'sqlite3'
end

group :production do
     gem 'pg'
     gem 'rails_12factor'
end

我花了两个小时试图找出解决方案,但实际上我什至不确定问题是什么。

最佳答案

问题在于:

gem 'bootstrap-sass', github: 'thomas-mcdonald/bootstrap-sass', branch: '3'

如果您检查下面的链接:

https://github.com/thomas-mcdonald/bootstrap-sass/branches

该分支似乎已被删除,可能已合并到主分支中,根据OP的反馈,任何随后使用它的人都应将以下内容添加到他们的Gemfile中:

gem 'sass-rails', '>= 3.2' # sass-rails needs to be higher than 3.2
gem 'bootstrap-sass', '~> 3.0.3.0'

关于heroku-toolbelt - 上传到heroku导致错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20483891/

相关文章:

heroku - 如何停止部署到正在进行的 Heroku

heroku - 有没有办法为 Heroku Toolbelt 设置默认应用程序?

ruby-on-rails - 这些 Ruby 版本中存在 heroku 命令吗?

ruby-on-rails - 更改 Heroku(ruby on rails) 服务器的日期和时间

postgresql - heroku postgresql 推送一张表

ruby-on-rails - 名称解析暂时失败 (PG::ConnectionBad)

node.js - MongoDB 更新到 3.0 后 Heroku 应用程序崩溃

heroku - 将 WebSharper.Suave Web 应用程序部署到 Heroku

git - 'git push heroku master' 仍在请求身份验证

docker - 最新的Docker更新打破了Heroku CLI?