在 Windows 环境中,尝试部署到 Heroku 时出现以下错误
C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/base.rb:32:in
': 没有这样的文件或目录 - git
远程(Errno::ENOENT)
来自 C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/ba
se.rb:32:inshell'
from C:/Ruby/lib/ruby/1.8/fileutils.rb:121:in
chdir'
来自 C:/Ruby/lib/ruby/1.8/fileutils.rb:121:incd'
from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/ba
se.rb:32:in
壳'
来自 C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/commands/ap
p.rb:52:increate'
from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/command.rb:
48:in
发送'
来自 C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/command.rb:
48:在run_internal'
from C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/lib/heroku/command.rb:
20:in
跑步'
来自 C:/Ruby/lib/ruby/gems/1.8/gems/heroku-1.9.13/bin/heroku:13
来自 C:/Ruby/bin/heroku:19:in `load'
来自 C:/Ruby/bin/heroku:19
知道我该如何纠正这个问题吗?这是从 Ruby 命令行运行的(在我看来就像常规命令行)
好吧,我找到了一种让它发挥作用的方法以及为什么它可能会发生。
由于某种原因,我只能从 CMD 提示符运行 Ruby 命令,但 GIT 命令似乎只能在 GIT Bash 中运行。在 GIT Bash 中,Ruby 命令不起作用。
当您运行 Heroku 命令来创建服务时,它似乎想要运行某些 GIT 命令,这些命令在我设置的 CMD 提示符下不起作用。
为了暂时解决这个问题,我手动添加 GIT 的 Heroku 路径作为远程,然后在需要时手动推送。一个额外的步骤,但一切仍然按预期进行。
如果您需要解决问题的帮助,请查看此链接中的信息:http://www.wiki.devchix.com/index.php?title=Working_around_the_%22heroku_create%22_error http://www.wiki.devchix.com/index.php?title=Working_around_the_%22heroku_create%22_error
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)