新手问题 公司内网如何安装 gem?

thunder123bird · April 10, 2014 · Last by lup165340815 replied at April 17, 2014 · 2772 hits

公司内网不能链接互联网,如何安装 gem?

代理服务器或者在公司内部搭建 gem server

#1 楼 @hmilym 搭建 gem server 有没有教程啊?

将需要的 gem 放在 rails 的 vendor/cache 目录下,如果是 git 方式引用的,build 成 gem。安装可以用

bundle install --local

或者像 cap 那样

bundle install --local --gemfile Gemfile --path default_path/shared/bundle --deployment --quiet --without development test

自己写一个或者使用 rubygems.org 开源的代码自己部署一个就可以啦

用笔记本的话就拔下网线,用手机热点上网装 gem,搞定。 最后连上网线,拿手机话费发票找老板报销。

You need to Sign in before reply, if you don't have an account, please Sign up first.