本文介绍了在我的gemfile中从Github指定gem的分叉版本时'找不到gem'错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用searchlogic gem的。在我的gemfile中,我有

I am trying to use this forked version of the searchlogic gem. In my gemfile, I have

gem "searchlogic", :git => "http://github.com/railsdog/searchlogic.git"

当我做 bundle install ,我得到这个错误:

when I do bundle install, I get this error:

Could not find gem 'searchlogic (>= 0, runtime)' in http://github.com/railsdog/searchlogic.git (at master).
Source does not contain any versions of 'searchlogic (>= 0, runtime)'

什么导致这个错误?感谢您的阅读。

What is causing this error? Thanks for reading.

推荐答案

这是因为您的fork没有通过rd_searchlogic gem定义searchlogic gem。因此,在您的Gemfile中使用:

It's because your fork not define searchlogic gem by rd_searchlogic gem. So use in your Gemfile :

gem "rd_searchlogic", 
  :git => "rd_searchlogic.gemspec", 
  :require => "searchlogic"

这篇关于在我的gemfile中从Github指定gem的分叉版本时'找不到gem'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 20:05