Rails 3从github安装一个分支的gem

Joh*_*ohn 6 rubygems ruby-on-rails github bundler ruby-on-rails-3

我试图从https://github.com/raid5/paths_of_glory/tree/rails3安装gem

当我在自述文件中放入以下代码行时,如自述文件的步骤1中所指定:

gem 'paths_of_glory', :git => 'git://github.com/raid5/paths_of_glory.git', :branch => 'rails3'
Run Code Online (Sandbox Code Playgroud)

然后我运行"bundle install"并获得以下消息:

获取git://github.com/raid5/paths_of_glory.git C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/source.rb:559:in ':没有这样的文件或目录 - git clone"git://github.com/raid5/paths_of_glory .git""C:/Ruby192/lib/ruby/gems/1.9.1/cache/bundler/git/paths_of_glory-e6d58ab38 da51ed00031d8072c6aad8102babf9e" --bare --no-hardlinks(Errno :: ENOENT)来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/sourc e.rb:559:in git' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/sourc e.rb:618:in缓存"

......(还有几行)

    from C:/Ruby192/bin/bundle:19:in `load'
    from C:/Ruby192/bin/bundle:19:in `<main>'
Run Code Online (Sandbox Code Playgroud)

知道出了什么问题吗?我很感激.我正在使用rails 3而我的操作系统是7号窗口.

Pre*_*her 6

这可能不是你的问题,但如果你没有安装git,那就是我希望看到的错误.如果尚未安装,请确保使用命令行选项进行安装.

  • 你是对的钱.我确实安装了git,但是我之前在命令提示符下运行了bundle install而没有任何问题,但是在这个实例中,来自git bash控制台的"bundle install"解决了这个问题...在这样一个愚蠢的问题上浪费了一个小时.谢谢. (2认同)