我在Stackoverflow上看到了很多与我的问题类似的问题,但是当我尝试将我的应用程序推送到heroku时,没有遇到任何问题。
我的Ruby On Rails应用程序是在rails 3.2.17和ruby v.1.9.3上创建的,目前它在本地设置中我想将它推送到heroku服务器..但是我总是得到同样的错误,这是我收到的完整回复' git Bash提示'
$ 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'
答案 0 :(得分:0)
我自己已经解决了,实际上我的Gemfile源设置为'http://ruby.taobao.org',我想在安装宝石的过程中http://ruby.taobao.org和heroku服务器之间存在某种网络冲突。我将源代码更改为“http://rubygems.org”并且它有效。