How can I install a local gem?

前端 未结 9 1938
夕颜
夕颜 2020-11-28 00:47

If I download a .gem file to a folder in my computer, can I install it later using gem install?

9条回答
  •  温柔的废话
    2020-11-28 01:12

    You can download gems from https://rubygems.org/gems/ or build you local gem via bundle and rack.

    eg:

    • bundle gem yourGemName
    • rake install

    Take care of installing dependencies before installing actual gems.

    • gem install --local /pathToFolder/xxx-2.6.1.gem

    Note: If using fluentd td-agent and ruby on same machine. Please make sure to use td-agent's td-agent-gem command. td-agent has own Ruby.

提交回复
热议问题