Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 试图部署到heroku,安装锄头时爆炸_Ruby On Rails_Heroku - Fatal编程技术网

Ruby on rails 试图部署到heroku,安装锄头时爆炸

Ruby on rails 试图部署到heroku,安装锄头时爆炸,ruby-on-rails,heroku,Ruby On Rails,Heroku,我在Gemfile中注释了hoe,我的rubygems版本是2.0+。下面是我运行git push heroku master时的输出: 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

我在Gemfile中注释了hoe,我的rubygems版本是2.0+。下面是我运行git push heroku master时的输出:

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 git@heroku.com:limitless-river-5139.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:limitless-river-5139.git'

谢谢您的建议。

请执行以下操作:

gem update --system
然后


再一次。

我的.git中有几个项目。他们中的一些人仍然有锄头宝石。这就是问题的原因。

是安装hoe还是依赖另一个gem?嗯,它是rake的助手,但我认为这不是必需的。不要安装hoe。生产中不可能需要它。gem更新成功了吗?是不是你在尝试推送heroku时遇到了同样的错误?是的,gem在我的机器上安装得很好。你能详细说明一下这个修复方法吗?我已经在GemFile中将hoe gem显式地移到了development group中,并从heroku中删除了开发环境,但仍然得到了相同的错误。@SumitBisht,当我解决这个问题时,我还是个新手。我相信,当我更新我的git回购时,我没有使用
-a
选项来确保删除的文件在主分支中被删除。感谢您的澄清!在我的例子中,我使用RooGem解析excel文件,它具有hoe的依赖性。移除roo宝石对我来说是个好办法。
git push heroku master