Error when running gem specific_install

断了今生、忘了曾经 提交于 2019-12-23 15:32:15

问题


I am trying to run 'gem specific_install' (https://github.com/rdp/specific_install) to install another gem from a Github repository:

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

After being prompted for my Github Username and password, I am able to download the gem. However, I get the following error:

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

Apparently, other people have the same error based on a comment to a specific_install related answer to this question: How to install gem from GitHub source?

How can this error be resolved?


回答1:


According to this issue this is due to an outdated version of gem (rubygems).

Updating gem should fix it, if you are using rvm you should run rvm rubygems current (this worked for me), if you are not using rvm I believe you should follow How to upgrade rubygems.



来源:https://stackoverflow.com/questions/27045874/error-when-running-gem-specific-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!