代码之家  ›  专栏  ›  技术社区  ›  Daniel Beardsley

从Git存储库安装rails插件

  •  4
  • Daniel Beardsley  · 技术社区  · 17 年前

    我一直在尝试安装 Shoulda

    script/plugin install git://github.com/thoughtbot/shoulda.git
    

    但我得到的只是:

    removing: C:/Documents and Settings/Danny/My Documents/Projects/Ruby On Rails/_ProjectName_/vendor/plugins/shoulda/.git
    >
    

    vender/plugins

    (这是在windows框上)

    2 回复  |  直到 17 年前
        1
  •  7
  •   Jordi Bunster    17 年前

    你安装了git吗?如果你不这样做,那就行不通了。Rails假定git已经安装,并且可以在您的路径中找到。

    here .

        2
  •  0
  •   Chris Charabaruk    15 年前

    如果您对升级不满意(来吧,这只是一个小版本),下面的补丁可以处理这些问题:

    --- reporting.rb.orig   2010-06-11 01:00:24.739991600 -0400
    +++ reporting.rb        2010-06-18 00:16:39.517649400 -0400
    @@ -35,7 +35,7 @@
       #   puts 'But this will'
       def silence_stream(stream)
         old_stream = stream.dup
    -    stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')
    +    stream.reopen(RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'NUL:' : '/dev/null')
         stream.sync = true
         yield
       ensure
    @@ -56,4 +56,4 @@
           raise unless exception_classes.any? { |cls| e.kind_of?(cls) }
         end
       end
    -end
    \ No newline at end of file
    +end