离线 gem 依赖 [英] Offline gem dependencies
问题描述
不幸的是,当我在工作时,我正在一个无法连接到互联网的网络上进行开发.所以我一直从 rubygems.org 下载我需要的每个 gem,然后通过 flashdisk 将它们复制到内部网络.这很好用,除非当我需要一个具有其他 gem 依赖项的 gem 时,我必须单独下载它们,而且它很慢而且很乏味.
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.
有没有办法下载 gem 及其所有依赖 gem 以进行离线安装?我在互联网上有一台可以安装 gem 的计算机,我希望我可以下载我需要的 gem,它会自动安装依赖项,然后我可以复制到内部网络.但是 gem install
似乎不会在安装后留下 .gem 文件.
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.
推荐答案
看看 Bundler 工具,特别是bundle package
可能对您的用例有用.
Have a look at the Bundler tool, especially bundle package
could be useful for your use case.
这篇关于离线 gem 依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!