Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.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 安装山狮后heroku命令被破坏_Ruby - Fatal编程技术网

Ruby 安装山狮后heroku命令被破坏

Ruby 安装山狮后heroku命令被破坏,ruby,Ruby,我尝试使用 heroku run bundle exec rails console 以前起作用的命令。它给了我下面的错误信息。我也试着跑 heroku info 并收到了类似的错误消息。我在使用heroku toolbelt登录之前和之后都这样做了,结果是一样的。我也在另一个网站上试过,得到了同样的结果。两个网站都在运行,只是无法访问控制台 有人能解释一下问题是什么吗 !!Heroku客户端内部错误 Error: No such file or directory - git

我尝试使用

heroku run bundle exec rails console
以前起作用的命令。它给了我下面的错误信息。我也试着跑

heroku info
并收到了类似的错误消息。我在使用heroku toolbelt登录之前和之后都这样做了,结果是一样的。我也在另一个网站上试过,得到了同样的结果。两个网站都在运行,只是无法访问控制台

有人能解释一下问题是什么吗

!!Heroku客户端内部错误

Error:       No such file or directory -  git --version  (Errno::ENOENT)
Backtrace:   /usr/local/heroku/lib/heroku/helpers.rb:103:in ``'
             /usr/local/heroku/lib/heroku/helpers.rb:103:in `has_git?'
             /usr/local/heroku/lib/heroku/helpers.rb:108:in `git'
             /usr/local/heroku/lib/heroku/command/base.rb:206:in `git_remotes'
             /usr/local/heroku/lib/heroku/command/base.rb:179:in `extract_app_in_dir'
             /usr/local/heroku/lib/heroku/command/base.rb:31:in `app'
             /usr/local/heroku/lib/heroku/command/run.rb:108:in `block in run_attached'
             /usr/local/heroku/lib/heroku/helpers.rb:236:in `action'
             /usr/local/heroku/lib/heroku/command/run.rb:107:in `run_attached'
             /usr/local/heroku/lib/heroku/command/run.rb:21:in `index'
             /usr/local/heroku/lib/heroku/command.rb:206:in `run'
             /usr/local/heroku/lib/heroku/cli.rb:28:in `start'
             /usr/bin/heroku:24:in `<main>'

Command:     heroku run bundle exec rails console
Version:     heroku-toolbelt/2.33.2 (x86_64-darwin10.8.0) ruby/1.9.3
错误:没有这样的文件或目录-git--version(Errno::enoint)
回溯:/usr/local/heroku/lib/heroku/helpers.rb:103:in``'
/usr/local/heroku/lib/heroku/helpers.rb:103:in'has_git'
/usr/local/heroku/lib/heroku/helpers.rb:108:in'git'
/usr/local/heroku/lib/heroku/command/base.rb:206:in'git_remotes'
/usr/local/heroku/lib/heroku/command/base.rb:179:in'extract_app_in_dir'
/usr/local/heroku/lib/heroku/command/base.rb:31:in'app'
/usr/local/heroku/lib/heroku/command/run.rb:108:in'block in run_attached'
/usr/local/heroku/lib/heroku/helpers.rb:236:in'action'
/usr/local/heroku/lib/heroku/command/run.rb:107:in'run_attached'
/usr/local/heroku/lib/heroku/command/run.rb:21:in'index'
/usr/local/heroku/lib/heroku/command.rb:206:在“run”中
/usr/local/heroku/lib/heroku/cli.rb:28:in'start'
/usr/bin/heroku:24:in`'
命令:heroku run bundle exec rails控制台
版本:heroku toolbelt/2.33.2(x86_64-darwin10.8.0)ruby/1.9.3

此问题是由于在我的Mac上安装了Mountain Lion造成的。为了修复它,我必须打开XCode首选项并在下载文件夹中安装命令行工具

只要转到heroku控制台,它对我有效,你在基本应用程序文件夹dir中吗?heroku控制台也不工作,是的,我在基本folderdo git版本中,看看会发生什么,看起来heroku在查找git时遇到了问题。@伙计,你说得对-找不到bash:git:command。这是否意味着git已被卸载?有时会发生:-)