2014-09-28 46 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使用分叉版本。

相關問題