Is it possible to download a Ruby gem without installing it automatically?

北城以北 提交于 2019-12-20 17:38:25

问题


When I download something using gem I'd like to be able to just download the gem, and then choose whether or not I want to install it. I'm asking this because I'd like to install a particular gem on more than one computers ( without installing from the internet on each one ).


回答1:


gem fetch

So, something like $ gem fetch gosu ... this will leave gosu-0.7.14.gem in the current directory.

This will work even if you have already installed it.




回答2:


Most of the gems are hosted on github.com right now, you just have to clone the repo.




回答3:


Yes it is. Browse to the package's page on RubyGems.org and follow the download link.

Eg. from https://rubygems.org/gems/pony to https://rubygems.org/downloads/pony-1.4.gem



来源:https://stackoverflow.com/questions/1401653/is-it-possible-to-download-a-ruby-gem-without-installing-it-automatically

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