问题描述
不幸的是,当我在工作时,我正在开发一个不能连接到互联网的网络。所以我一直从rubygems.org下载每个我需要的gem,然后通过flashdisk将它们复制到内部网络。这工作正常,除了当我需要一个具有其他宝石依赖的宝石,我必须单独下载这些,它是缓慢和乏味。有没有办法下载宝石和所有它的依赖宝石离线安装?我有一台互联网上的电脑,我可以做宝石安装,我希望我可以下载我需要的宝石,它会自动安装依赖关系,然后我可以复制到内部网络。但是 gem install
在安装后似乎不会将.gem文件留下。
查看工具,尤其是 bundle package
可能对您的用例有用。
Unfortunately, when I am at work I am developing on a network that can in no way be connected to the internet. So I have been downloading each gem I need individually from rubygems.org and then copying them via flashdisk to the internal network. This works fine except when I need a gem that has other gem dependencies I have to individually download these and it is slow and tedious.
Is there a way to download a gem and all of it's dependent gems for an offline install? I do have a computer on the internet that I can do gem installs from and I was hoping I could download the gems I need and it would automatically install the dependencies, and then I could copy across to the internal network. But gem install
does not seem to leave a .gem file behind once it is installed.
Have a look at the Bundler tool, especially bundle package
could be useful for your use case.
这篇关于离线宝石依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!