在不访问官方存储库的情况下安装Ruby Gems [英] Installing Ruby Gems without access to the official repository

查看:75
本文介绍了在不访问官方存储库的情况下安装Ruby Gems的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在办公室使用代理脚本连接到Internet.结果是我的 命令提示符(Win XP)无法连接,我只能使用 浏览器.

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.

是否可以手动安装一些需要的红宝石宝石-无需使用

Is there some I can install some ruby gems that I need manually - without using

gem install 'abc'

或者有没有办法让我的命令提示符连接到互联网. 尽管我的IE设置确实使用了脚本,但是我仍然无法连接CMD.

Or is there a way I can get my command prompt to connect to the internet. Although my IE settings do use the script, I still cant get the CMD to connect.

推荐答案

在密闭环境中工作时,我遇到了同样的问题.一个不错的解决方法是下载对USB记忆棒感兴趣的gem,然后手动安装.

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.

这是您可以找到所有可用红宝石宝石的网站. Ruby gems下载.找到您感兴趣的一个并下载.

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

然后将gem移至您选择的目录中,并从命令提示符下将cd移至该目录中. 我正在使用C:/ruby193/bin/pony-1.4.gem

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

假设我们感兴趣的宝石是小马宝石(smtp电子邮件).

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

只需输入gem install pony-1.4.gem

,除非您拥有受限制的acc且没有足够的管理权限,否则应手动安装它.

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

这篇关于在不访问官方存储库的情况下安装Ruby Gems的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆