English 中文(简体)
管理相互冲突的废墟
原标题:Managing conflicting versions of ruby gems

我正在建立一个由用户提供废墟代码的框架。 它基本上是一个原始机制。 我希望用户提供废墟代码,能够要求自己的地块。 我打算有“插图”一揽子计划,包括一份带有地段的供应商名录。

How can I load gems that are required by the plugin without having them conflict with my framework s gems? For example, if my framework uses treetop version 1.3.0, and a plugin uses treetop 1.4.2 I want each to work with their specified version.

同样,是否有办法防止金gin相互冲突?

I have looked at gem_plugin, _why s sandbox, and some other tools. But I don t see any library that specifically handles this case - I assume its been done before.

我也审视了Bundler的内部情况,看看它如何管理好像版本。 如果需要,我准备做一些极其复杂的 st。 但我仍然不清楚如何做到这一点。

我在如何落实这一点方面也有很多自由。 因此,如果你认为我是 bar树,请说。

感谢任何建议。

SIDE NOTE:在我写这番话时,我需要类似于Java servlet集装箱中的班轮。 世界钻石协会的档案可以包括杰尔文档,网络应用组的负荷者将更喜欢全球舱面的轮胎。 是否在废墟中划出任何“舱面”(即装载量-胎面,需要等)?

最佳回答

为了bl,你可以同时装满两版同样的 g。

Bundler does a good (ish) job of looking through all of the required gems and finding a solution to the various overlapping dependencies, but even so it is limited to only loading one version of a gem at a time.

这导致原始开发商经常需要更新,以支持在依赖地块上作出的任何变化,以避免你描述的情况。

(Don t get me started on the screw up that results from the various competing JSON implementations and the pain you have to go through when you have several gem dependencies all requiring different ones.)

问题回答

完全不同意上述答复。 在这方面,我是怎样做的:

www.un.org/Depts/DGACM/index_french.htm - S gem list my_gem

`*** LOCAL GEMS ***
my_gem (1.0.1, 1.0.0, 0.0.2)
`

www.un.org/Depts/DGACM/index_french.htm - S gem lock my_gem-1.0.0 > locklist.rb

编制特定版本的受扶养人名单,列入锁名单

require  rubygems 
gem  my_gem ,  = 1.0.0 
gem  gem_base ,  = 1.0.0 
gem  rest-client ,  = 1.7.2 
gem  savon ,  = 1.1.0 
gem  addressable ,  = 2.3.6 
gem  mime-types ,  = 1.25.1 
gem  netrc ,  = 0.11.0 

现在,你可以做<条码>载荷(锁编号.rb),其中将装上特定版本的em子及其附属物。 参看ma,无Bundler。





相关问题
Ruby parser in Java

The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...

rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

multiple ruby extension modules under one directory

Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I ve a project with two extension modules, foo.so and bar.so which ...

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

热门标签