2013-04-18 28 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

是的,寶石安裝在我的機器上很好。 –