2012-08-07 62 views
1

的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。

+0

'git'命令是否工作正常? “C:/ Ruby193/lib/ruby​​/gems/1.9.1/cache /”是否存在? – iltempo 2012-08-07 22:28:41

+0

@iltempo文件夹C:/Ruby193/lib/ruby/gems/1.9.1/cache/bundler/git/存在,但它是空的 – 2012-08-08 15:57:32

+0

有关更多详细信息,请参见https://github.com/carlhuda/bundler/issues/2044 – 2012-08-09 14:00:45

回答

5

这是因为我没有安装Git。

我安装了Git并将其添加到PATH系统变量中。 bundle后来成为工作

1

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

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

谢谢你帮助我这个安德烈。