How can I install a local gem?

前端 未结 9 1911
夕颜
夕颜 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:18

    Also, you can use gem install --local path_to_gem/filename.gem

    This will skip the usual gem repository scan that happens when you leave off --local.

    You can find other magic with gem install --help.

    0 讨论(0)
  • 2020-11-28 01:18

    if you download the project file from github or other scm host site, use gem build to build the project first, so you can get a whatever.gem file in current directory. Then gem install it!

    0 讨论(0)
  • 2020-11-28 01:19

    you can also use the full filename to your gem file:

    gem install /full/path/to/your.gem
    

    this works as well -- it's probably the easiest way

    0 讨论(0)
提交回复
热议问题