簡體   English   中英

從Git存儲庫安裝rails插件

[英]Installing a rails plugin from a Git repository

我一直在嘗試安裝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目錄為空。 我將Rails 2.1.1安裝為gem並驗證了2.1.1已加載(使用put插入config / boot.rb)。 關於發生了什么的任何想法?

(這是在一個窗戶框上)

你有安裝git嗎? 如果你不這樣做,那就行不通了。 Rails假設安裝了git並且可以在PATH中找到。

你可以在這里獲得Git for Windows。

對於仍然存在這個問題的人來說,從Rails 2.3.5開始,你很可能會得到一個錯誤,因為最近的Ruby / Win32版本是用MinGW完成的。 但是,問題已經在那里和2.3.8之間進行了修補,只要你在這一點上安裝了msysgit,就應該Just Work。

如果您對升級不滿意(來吧,這只是一點點發布),以下補丁將處理:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM