2014-11-20 60 views
4

我試圖運行「寶石specific_install」(https://github.com/rdp/specific_install)從Github上庫安裝另一顆寶石:錯誤運行時,寶石specific_install

sudo gem specific_install https://github.com/RemoteRepository/foo_gem.git 

被提示輸入我的Github上的用戶名和密碼後,我能下載寶石。不過,我得到以下錯誤:

ERROR: While executing gem ... (NoMethodError) 
    undefined method `build' for Gem::Package:Module 

顯然,其他人都基於一個specific_install相關答案評論這個問題同樣的錯誤:How to install gem from GitHub source?

如何這個錯誤可以解決?

回答

1

根據此issue這是由於gem(rubygems)的過時版本。

更新gem如果你不使用RVM應該修復它,如果你正在使用RVM,應該運行rvm rubygems current(這個工作對我來說),我相信你應該遵循How to upgrade rubygems