当我尝试运行我的sinatra应用程序时,我收到了这个错误:
C:\Users\A2\Desktop\freetouring_v2>rackup -p 4444
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/git-version-bump-0.15.1/lib/git-version-b
ump.rb:299:in `gem_version': GVB.version(false) failed; perhaps you need to inst
all git? (GitVersionBump::VersionUnobtainable)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/git-version-bump-0.15.1/lib/
git-version-bump.rb:37:in `version'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/git-version-bump-0.15.1/lib/
git-version-bump/version.rb:2:in `<module:GitVersionBump>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/git-version-bump-0.15.1/lib/
git-version-bump/version.rb:1:in `<top (required)>'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/backports-3.6.7/lib/backport
s/std_lib.rb:9:in `require'
问题似乎与Git有关。那么,任何人都可以向我解释究竟是什么问题以及如何解决它?
答案 0 :(得分:0)
考虑lib/git-version-bump.rb#L233-L237
如何确定git是否可用,似乎只是为了确保git在你的PATH中。
def self.git_available?
system("git --version >/dev/null 2>&1")
$? == 0
end
检查echo %PATH%
是否引用了您的git安装文件夹
您只需解压缩PortableGit-2.7.3-64-bit.7z.exe
存档即可安装git。
答案 1 :(得分:0)
git --verison
它将为您提供系统上安装的git版本。
我希望它有效。