Installing Ruby Gems without access to the official repository

前端 未结 2 1640
陌清茗
陌清茗 2020-12-01 10:17

I\'m connected to the internet using a proxy script in my office. As a result my command prompt (Win XP) doesn\'t connect and I can access net only using the browser.

<
相关标签:
2条回答
  • gem install --force --local *.gem
    

    http://help.rubygems.org/kb/rubygems/installing-gems-with-no-network

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

    I had the same problem when working on a confined environment. A nice workaround is to download the gem that you are interested in a usb stick and then install it manually.

    This is the website where you can find all available ruby gems. Ruby gems download. Find the one you are interested and download it.

    Then move the gem in a directory of your choice and cd into that from the command prompt. I am using C:/ruby193/bin/pony-1.4.gem

    Let's say that the gem we are interested in is the pony gem (smtp email).

    Just type gem install pony-1.4.gem

    and you should get it installed manually unless you have a restricted acc with not adequate administrative privileges.

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