如何告诉Gem文件使用宝石的特定本地副本 [英] How to tell the Gem File to use a specific local copy of a gem

查看:90
本文介绍了如何告诉Gem文件使用宝石的特定本地副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我想使用本地和独特的gem,而不是Github的gem版本,或者从它获取的任何地方。



如何从 / MyPath /中指定要使用 gemmygem MyGem.gem

解决方案

试试在 Gemfile

  gemmygem,:path => /MyPath/MyGem.gem

请注意,在这里最好使用相对链接,例如:

  gemmygem,:path => vendor / MyPath / MyGem.gem


Say I have a gem living happily at:

  1. /MyPath/MyGem.gem

And I want to use the local and unique gem rather than a gem version from Github, or wherever it fetches it from.

How do I specify I want to use gem "mygem" from /MyPath/MyGem.gem

解决方案

Try, in your Gemfile:

gem "mygem", :path => "/MyPath/MyGem.gem"

Note that it's probably best to use a relative link in there, like:

gem "mygem", :path => "vendor/MyPath/MyGem.gem"

这篇关于如何告诉Gem文件使用宝石的特定本地副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆