问题描述
我的宝石档案包含:
My gem file contains:
gem "breadcrumb", :git => "[email protected]:mjacobus/Breadcrumb.git"
gem "simple_menu", :git => "[email protected]:mjacobus/simple_menu.git"
第一个gem按预期安装,但第二个失败。
The first gem installs as expected, but the second one fails.
Updating [email protected]:mjacobus/simple_menu.git
Fetching gem metadata from https://rubygems.org/........
Could not find gem 'simple_menu (>= 0) ruby' in [email protected]:mjacobus/simple_menu.git (at master).
Source does not contain any versions of 'simple_menu (>= 0) ruby'
类似的帖子指出缺少.gemspec文件,但是这个文件存在。
Similar posts points to the lack of the .gemspec file, but this file exists. https://github.com/mjacobus/simple_menu/blob/master/simple_menu.gemspec
我可能会做一些愚蠢的事,让别人的眼睛能够看到。
I am probably doing something stupid that someone else's eyes will be able to see.
我将repo克隆到vendor / plugins文件夹中,并更改了我的Gemfile
I cloned the repo into the vendor/plugins folder and changed my Gemfile
gem "simple_menu", :path => "vendor/plugins/simple_menu"
Bundle安装问题现在发生错误:
Bundle install issues now the error:
bundle install
Fetching gem metadata from https://rubygems.org/.......
Could not find gem 'simple_menu (>= 0) ruby' in source at vendor/plugins/simple_menu.
Source does not contain any versions of 'simple_menu (>= 0) ruby'
编辑2
我知道这是一个愚蠢的错误。宝石名称不正确。
edit 2
I knew it was a stupid error. The gem name was not correct.
推荐答案
gemspec文件名为 simplemenu.gemspec ,而不是 simple_menu.gemspec 。
The gemspec file as named simplemenu.gemspec instead of simple_menu.gemspec.
这篇关于软件包安装错误:源不包含任何版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!