简体   繁体   English

从github或单独的服务器而不是RubyGems下载所有的gem和依赖项?

[英]Download all gems and dependancies from github or a seperate server instead of RubyGems?

My companies networking won't allow us to access almost any site but github, so I'm wondering how I will be able to install gems. 我公司的网络不允许我们访问除github之外的几乎所有站点,因此我想知道如何安装gems。

Option 1: point to the github source of all the gems, but wouldn't we also have to specify the dependencies from github as well ? 选项1:指向所有gems的github源码,但是我们是否还必须指定github的依赖项呢?

Option 2: We have a proxy server which has access to RubyGems, and I'm thinking if we can download all the gems and dependencies there then we can source the gems over to that machine. 选项2:我们有一个可以访问RubyGems的代理服务器,我在想,如果我们可以在那里下载所有的gem和依赖项,那么就可以将这些gem采购到该机器上。 Would I need to literally host the files on that server to point at them from my gemfile? 我需要从字面上托管该服务器上的文件以从我的gemfile指向它们吗?

Are either of those options possible ? 这些选项中的任何一个都有可能吗?

Edit: I think this question solves my problem: How to build a rubygems mirror server? 编辑:我认为这个问题解决了我的问题: 如何构建rubygems镜像服务器?

You can source your gems from 'gems.github.com'. 您可以从“ gems.github.com”获取宝石。 They publish a list of gems that can be sourced from them here: http://gems.github.com/list.html As I understand the list is no longer being updated though, so you'll run into problems eventually. 他们在此处发布了可以从其中获取宝石的列表: http : //gems.github.com/list.html据我了解,列表不再被更新,因此最终会遇到问题。

I guess you could try to run a local mirror. 我猜您可以尝试运行本地镜像。 Found this after a quick google: https://github.com/rubygems/rubygems-mirror 经过快速的Google搜索后发现了这一点: https//github.com/rubygems/rubygems-mirror

That said, I'm with mpapis. 就是说,我在使用mpapi。 If you are working for a company that wants you to code Ruby and they don't allow use of rubygems.org I'd ask myself some serious questions about whether I'd want to be employed there. 如果您在一家希望您编写Ruby的公司工作,并且他们不允许使用rubygems.org,那么我会问自己一些有关我是否想在那工作的严重问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM