没有网络的情况下安装gem
我必须在没有互联网连接的机器上安装几个 gem 文件。为此,我从连接到互联网的计算机导入了包,并将文件复制到离线计算机。我按照这个指南进行安装,但它已弃用。事实上,结果如下:
gem install --force --local *.gem
ERROR: Could not find a valid gem '*.gem' (>= 0) in any repository
我的问题是:在没有网络的情况下如何安装这20/30种不同的gem?还有别的办法吗?
谢谢你!
更新: 我再次尝试逐文件夹安装 gem,首先使用“gem build”,然后使用“gem install”。 结果:
WARNING: Unable to pull data from 'https://rubygems.org/': Errno::ENETUNREACH: Failed to open TCP connection to rubygems.org:443 (Network is unreachable - connect(2) for "rubygems.org" port 443) (https://rubygems.org/specs.4.8.gz)
1 gem installed
可能是代理问题?
I have to install several gem files on a machine that does NOT have an internet connection. To do this, I imported the packages from a machine that is connected to the internet and copied the files to the offline machine. I followed this guide for the installation, but it is deprecated. In fact, the result is as follows:
gem install --force --local *.gem
ERROR: Could not find a valid gem '*.gem' (>= 0) in any repository
My question is: how can I install these 20/30 different gems without internet? Is there another way?
Thank you!
Update:
I tried again folder by folder to install the gems, first with "gem build" and then "gem install".
The result:
WARNING: Unable to pull data from 'https://rubygems.org/': Errno::ENETUNREACH: Failed to open TCP connection to rubygems.org:443 (Network is unreachable - connect(2) for "rubygems.org" port 443) (https://rubygems.org/specs.4.8.gz)
1 gem installed
Could be a proxy problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了解决方案。
基本上有2个问题:
如果我想从 gem 文件夹安装 gem,我必须首先运行构建并在安装之后运行。
但我也可以安装放置在缓存文件夹内的 gem,并在该文件夹内直接运行“gem install --force --local”。
谢谢大家的回答。
Found the solution.
Basically 2 Problems:
If i wanted to install the gems from the gem folder, i had first to run the build and after the install.
But i could also install the gems placed inside the cache folder, and inside this folder run directly "gem install --force --local".
Thank you all of you for your answers.