2013-04-18 29 views
1

我已经在我的Gemfile中注释了锄头,我的rubygems版本是2.0+。这是我运行时的输出git push heroku master试图部署到heroku,在安装锄头时爆炸

Installing json (1.7.7) 
     Installing rdoc (3.12.1) 
     Installing thor (0.17.0) 
     Installing railties (3.2.12) 
     Installing coffee-rails (3.2.2) 
     Installing commonjs (0.2.6) 
     Installing formtastic (2.2.1) 
     Installing formtastic-bootstrap (2.0.0) 
     Installing hoe (3.5.0) 
     Gem::InstallError: hoe requires RubyGems version >= 1.4. Try 'gem update --system' to update RubyGems itself. 
     An error occurred while installing hoe (3.5.0), and Bundler cannot continue. 
     Make sure that `gem install hoe -v '3.5.0'` succeeds before bundling. 
! 
!  Failed to install gems via Bundler. 
! 
!  Heroku push rejected, failed to compile Ruby/rails app 

To [email protected]:limitless-river-5139.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:limitless-river-5139.git' 

感谢您的任何建议。

+0

它是安装锄头还是依赖另一个宝石? – jahrichie

+0

呃,它是耙子的帮手,但我不认为它是必需的。 –

+0

不要安装锄头。它不可能在生产中需要。 – kch

回答

1

我在我的.git中有几个项目。他们中的一些人仍然拥有锄头宝石。这是造成这个问题。

+0

您能详细解释一下这个问题吗? 我已经明确地将锄头宝石移到了GemFile的开发小组中,并从heroku中移除了开发环境,但我仍然遇到同样的错误。 –

+0

@SumitBisht,当我解决这个问题时,我是新手。我相信当我更新我的git repo时,我没有使用'-a'选项来确保删除的文件在主分支中被删除。 –

+0

感谢您的澄清! 在我的例子中,我使用roo gem来解析有锄头依赖的excel文件。去除roo宝石对我来说是个诀窍。 –

2

请执行下列操作:

gem update --system 

然后

git push heroku master 

一次。

+0

我做到了,并没有奏效。 –

+0

是宝石更新成功吗?试图推向heroku会出现同样的错误吗? –

+0

是的,宝石安装在我的机器上很好。 –