Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用下面的代码创建了一个 git 存储库。
require 'rugged' $repopath='D:\Test12' Rugged::Repository.init_at($repopath, true) repo = Rugged::Repository.new($repopath) puts repo.path
但是,当我将上述代码作为 ruby myfile.rb 执行时,我没有得到任何输出
反斜杠应该加倍:$repopath='D:\\Test12'
$repopath='D:\\Test12'
反斜杠没有帮助..下载了 0.17.0.b7 并且它工作了.. 之前在 0.16 上工作..