我最近開始在運行gem或bundler時出現這個錯誤。 我記得我最近改變的唯一事情就是升級我的git版本。windows上的gems錯誤 - 「openpath:pathname too long」
我正在使用MINGW32作爲shell,並且這已經完美工作了一年多。
我確定git在我的PATH中,現在不知道下一步要查找什麼。
接下來我能解決這個問題的方法是什麼?
這裏是我得到的輸出的一個例子。這個例子顯示了Heroku的寶石,但束運行時,我得到了相同的結果安裝
$ heroku console
openpath: pathname too long (ignored)
Directory ""
File "chcp"
openpath: pathname too long (ignored)
Directory ""
File "git"
c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.14.0/lib/heroku/helpers.rb:111:in ``': No such file or directory - git --version (Errno::ENOENT)
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.14.0/lib/heroku/helpers.rb:111:in `has_git?'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.14.0/lib/heroku/helpers.rb:116:in `git'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.14.0/lib/heroku/command/base.rb:192:in `git_remotes'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.14.0/lib/heroku/command/base.rb:170:in `extract_app_in_dir'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.14.0/lib/heroku/command/base.rb:162:in `extract_app'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.14.0/lib/heroku/command/run.rb:72:in `console'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.14.0/lib/heroku/command.rb:114:in `run'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/heroku-2.14.0/bin/heroku:14:in `<top (required)>'
from c:/Ruby192/bin/heroku:19:in `load'
from c:/Ruby192/bin/heroku:19:in `<main>'
,這裏是上面提到的helpers.rb線111。
def has_git?
%x{ git --version } #this is 111
$?.success?
end
你已經知道了嗎?它看起來像ruby無法運行或找到你的git可執行文件。 – Casper