3
我跑了「gem sources -c
」,這樣我就不得不故意指定我要安裝gem的位置,因爲我現在有3個不同的gem安裝源 - RubyForge,Github和Gemcutter。我通過運行「gem sources -c」實際刪除了什麼?
C:\>gem sources -c
*** Removed specs cache ***
*** Removed user source cache ***
*** Removed latest user source cache ***
*** Removed system source cache ***
*** Removed latest system source cache ***
運行此命令後,我又跑gem sources
,以確保我不再有任何默認的來源,我得到這個:
C:\>gem sources
*** CURRENT SOURCES ***
http://gems.rubyforge.org
http://gems.github.com
http://gems.rubyforge.org/
http://gemcutter.org
換句話說,一切都沒有改變。
縱觀幫助gem sources -c
下面這似乎是正確的命令立刻刪除所有的寶石來源:
-c, --clear-all Remove all sources (clear the cache)
否則,看來你必須逐個刪除一個。 沒有什麼大不了的,因爲我只有4個,但我想知道我通過做「gem sources -c
」刪除了什麼。
C:\>gem sources --help
Usage: gem sources [options]
Options:
-a, --add SOURCE_URI Add source
-l, --list List sources
-r, --remove SOURCE_URI Remove source
-c, --clear-all Remove all sources (clear the cache)
-u, --update Update source cache
Local/Remote Options:
-p, --[no-]http-proxy [URL] Use HTTP proxy for remote operations
Common Options:
-h, --help Get help on this command
-V, --[no-]verbose Set the verbose level of output
-q, --quiet Silence commands
--config-file FILE Use this config file instead of default
--backtrace Show stack backtrace on errors
--debug Turn on Ruby debugging