宝石在本地安装XYZ(无需连接到互联网) [英] gem install XYZ locally (without connection to the internet)

查看:133
本文介绍了宝石在本地安装XYZ(无需连接到互联网)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在没有互联网连接的计算机上安装 win32-api antlr3 。有它这样的连接,我会使用像这样的宝石:

  gem install win32-api -r 
gem安装antlr3 -r

这显然不起作用。所以,我认为应该有办法下载 gem 并稍后安装它,但我不知道如何继续。



我发现了gem的其中操作符,它似乎表示宝石的本地位置:

  c:\> gem其中antlr3 
c:/tools/Ruby187/lib/ruby/gems/1.8/gems/antlr3-1.8.8/lib/antlr3.rb
code>

然而,它在win32-api上不起作用:

  c:\> gem其中win32-api 
错误:无法找到ruby库文件或共享库win32-api



虽然我以前安装过它。



有人可以向正确的方向暗示继续从这里开始?

解决方案

尝试


gem install --local path / to / file.gem



I need to install win32-api and antlr3 on a computer without internet connection. Had it such a connection, I'd use gem like so:

gem install win32-api -r
gem install antlr3 -r

This won't obviously work. So, I thought there should be a way to download the gem and install it later, but I am not sure how I would proceed.

I found gem's which operator, which seemd to indicate the local location of a gem:

c:\>gem which antlr3
c:/tools/Ruby187/lib/ruby/gems/1.8/gems/antlr3-1.8.8/lib/antlr3.rb

however, it didn't work on win32-api:

c:\>gem which win32-api
ERROR:  Can't find ruby library file or shared library win32-api

although I have previously installed it.

Can someone hint at the right direction to go on from here?

解决方案

Try,

gem install --local path/to/file.gem

这篇关于宝石在本地安装XYZ(无需连接到互联网)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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