使用Bundler获取git文件时出错

时间:2012-08-07 18:08:57

标签: ruby git gem bundler

的Gemfile:

source "http://rubygems.org"
gem "nokogiri", :git => "git://github.com/tenderlove/nokogiri.git"

当我运行bundle时,会发生以下错误:

Fetching git://github.com/tenderlove/nokogiri.git
Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/source.rb:592:in ``': No such file or directory - git clone "git://github.com/tenderlove/nokogiri.git" "C:/Ruby193/lib/ruby/gems/1.9.1/cache/bundler/git/nokogiri-d4bf05cb9e65f144f074351e5ebe3a0e44c00952" --bare --no-hardlinks (Errno::ENOENT)

我该如何解决?

它不仅可以与这颗宝石重现,还可以与其他宝石重现:黄瓜,水豚

我使用Windows。

2 个答案:

答案 0 :(得分:5)

因为我没有安装Git。

我安装了Git并将其添加到PATH系统变量中。 bundle之后开始工作

答案 1 :(得分:1)

对于其他任何新手,我使用msysgit在Windows 7上安装了Git。

然后在msysgit命令窗口(MINGW32)中,我移动到我的rails项目目录并运行bundle install,它运行正常。

感谢您帮助我这个安德烈。