【问题标题】:Error in git push heroku mastergit push heroku master 中的错误
【发布时间】:2014-07-05 19:11:03
【问题描述】:

我在 Stackoverflow 上看到了许多与我的问题有点相似的问题,但没有人遇到过与我尝试将我的应用推送到 heroku 时遇到的相同的问题。

我的 Ruby On Rails 应用程序是在 rails 3.2.17 和 ruby​​ v. 1.9.3 上创建的,目前它处于本地设置中,我想将它推送到 heroku 服务器。但我总是遇到同样的错误,这是我在“git Bash prompt”中得到的完整响应

    $ git push heroku master
Initializing repository, done.
Counting objects: 1708, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1640/1640), done.
Writing objects: 100% (1708/1708), 47.02 MiB | 150.00 KiB/s, done.
Total 1708 (delta 207), reused 0 (delta 0)

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-1.9.3
-----> Warning:
       Removing `Gemfile.lock` because it was generated on Windows
       Bundler will do a full resolve so native gems are handled p
       This may result in unexpected gem versions being used in yo
       In rare occasions Bundler may not be able to resolve your d
 all.
       https://devcenter.heroku.com/articles/bundler-windows-gemfi
-----> Installing dependencies using 1.5.2
       Running: bundle install --without development:test --path v
-binstubs vendor/bundle/bin -j4
       Fetching git://github.com/gregbell/active_admin.git
       Fetching source index from http://ruby.taobao.org/
       Resolving dependencies.....................................
       Network error while fetching
       http://rubygems-china.oss.aliyuncs.com/quick/Marshal.4.8/tr
emspec.rz
       Bundler Output: Fetching git://github.com/gregbell/active_a
       Fetching source index from http://ruby.taobao.org/
       Resolving dependencies.....................................
       Network error while fetching
       http://rubygems-china.oss.aliyuncs.com/quick/Marshal.4.8/tr
emspec.rz
 !
 !     Failed to install gems via Bundler.
 !

 !     Push rejected, failed to compile Ruby app

To git@heroku.com:myapp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:myapp.git'

【问题讨论】:

    标签: ruby-on-rails git heroku


    【解决方案1】:

    我自己解决了,实际上在我的 Gemfile 源中设置为“http://ruby.taobao.org”,我猜在安装 gems 的过程中http://ruby.taobao.org 和 heroku 服务器之间存在某种网络冲突。我将源代码更改为“http://rubygems.org”,它成功了。

    【讨论】:

      猜你喜欢
      • 2013-02-03
      • 2016-12-26
      • 1970-01-01
      • 2016-02-19
      • 1970-01-01
      • 1970-01-01
      • 2019-10-14
      • 2011-05-23
      • 2014-10-26
      相关资源
      最近更新 更多