2014-09-28 91 views
1

这是我Gemfile如何强制Bundle Gemfile中的版本?

source 'https://rubygems.org' 
gem 'jekyll', '~> 2.4.0' 
gem 'fontcustom', '~> 1.3.3' 

这就是我得到:

$ bundle update 
Fetching gem metadata from https://rubygems.org/........... 
Fetching additional metadata from https://rubygems.org/.. 
Resolving dependencies... 
Bundler could not find compatible versions for gem "listen": 
    In Gemfile: 
    fontcustom (~> 1.3.3) ruby depends on 
     listen (~> 1.0) ruby 

    jekyll (~> 2.4.0) ruby depends on 
     jekyll-watch (~> 1.1) ruby depends on 
     listen (2.7.0) 

什么是解决方法吗?我需要使用jekyll 2.4.0。

+1

我会fork'fontcustom' gem,改变它的'gemspec',并尝试它是否也运行listen_> 2.7.0'。 – spickermann 2014-09-28 07:39:24

回答

1

有人提交了拉取请求以支持在fontcustom中收听v1和v2:https://github.com/FontCustom/fontcustom/pull/191不幸的是,它尚未被接受。

source 'https://rubygems.org' 
gem 'jekyll', '~> 2.4.0' 
gem 'fontcustom', git: 'https://github.com/twalpole/fontcustom.git', branch: 'listen' 

然后,运行bundle install

您可以通过更改您的Gemfile使用分叉版本。

相关问题