在Bundler中,如何覆盖其依赖项的依赖项版本要求? [英] In Bundler, how can I override a dependency's version requirements for its own dependencies?

查看:49
本文介绍了在Bundler中,如何覆盖其依赖项的依赖项版本要求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序中有一些需求,使用Edge Rails(3.1)可以帮助我更快地完成任务。

I have a couple of needs in my application for which working on edge Rails (3.1) would help me complete my task faster.

问题是我所依赖的gem尚未正式支持Rails 3.1,并且具有〜> 3.0.0 railties依赖关系,这会产生依赖关系冲突,并且捆绑程序无法解决我的依赖关系。我可以以某种方式在应用程序的Gemfile中覆盖该要求,还是我唯一的解决方案来散布我的依赖项?

The problem is that one of the gems I depend on doesn't yet officially support Rails 3.1, and it has a "~> 3.0.0" railties dependency, which creates a dependency conflict and bundler can't resolve my dependencies. Can I override that requirement in my app's Gemfile somehow, or is my only workaround to fork my dependency?

推荐答案

很难,将其分支是解开这一点的唯一方法。或者,更精进一些,修改gem的/ vendor本地安装。

Sadly, branching it is the only way to unravel that. Or, being more hacky, modifying the /vendor local installation of the gem.

这篇关于在Bundler中,如何覆盖其依赖项的依赖项版本要求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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