RefineryCMS引擎错误:没有有效的gemspec [英] RefineryCMS Engines Error: did not have a valid gemspec

查看:107
本文介绍了RefineryCMS引擎错误:没有有效的gemspec的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法安装任何引擎。从指南安装第一个事件引擎后,我有一个错误,说我没有有效的宝石规格。


在供应商/扩展中使用refinerycms-events(1.0)refinerycms-events在/ Users / lydia / Desktop / projects / cmsex / vendor / extensions / events没有有效的gemspec。这可以防止bundler安装bin或本机扩展,但这可能不会影响其功能。来自Rubygems的验证消息是:作者可能不是空的


现在每当我尝试安装另一个引擎,命令行表示安装已成功,但我无法在bundle show上找到该gem。我无法生成插件和数据库。



我已将这些行添加到我的Gemfile中:



gem' $ 2.1 $'$'
$ b

gem'refinerycms-search','〜> 2.1.0'



这是我在包中包含的宝石:

 包含的宝石:
* actionmailer(3.2.16)
* actionpack(3.2.16)
* activemodel(3.2.16)
* activerecord(3.2.16)
* activeresource(3.2.16)
* activesupport(3.2.16)
* acts_as_indexed(0.8.3)
* arel(3.0.3)
* awesome_nested_set(2.1.6)
babosa (0.3.11)
* bcrypt-ruby(3.1.2)
* builder(3.0.4)
* bundler(1.3.5)
* coffee-rails(3.2 .2)
* coffee-script(2.2.0)
* coffee-script-source(1.6.3)
* decorators(1.0.3)
* devise(2.2) .8)
*蜻蜓(0.9.15)
* erubis(2.7.0)
* execjs(2.0.2)
* friendly_id(4.0.10.1)
*全球化(3.0.2)
* hike(1.2.3)
* i18n(0.6.9)
*旅程(1.0.4)
* jquery-rails(2.3.0) )
* json(1.8.1)
*邮件(2.5.4)
* mime-types(1.25.1)
* multi_json(1.8.2)
* orm_adapter(0.5.0)
* paper_trail(2.7.2)
* polyglot(0.3.3)
* rack(1.4.5)
* rack-cache( 1.2)
* rack-ssl(1.3.3)
* rack-test(0.6.2)
* rails(3.2.16)
* rails -i18n(0.7。 4)
* railties(3.2.16)
* rake(10.1.0)
* rdoc(3.12.2)
* refinerycms(2.1.1)
(2.1.0)
* refinerycms-dashboard(2.1。 1)
* refinerycms-events(1.0)
* refinerycms-i18n(2.1.0)
* refinerycms-images(2.1.1)
* refinerycms-pages(2.1。 1)
* refinerycms-resources(2.1.1)
* routing-filter(0.3.1)
* sass(3.2.12)
* sass-rails(3.2。 6)
* seo_meta(1.4.0)
* sprocket(2.2.2)
* sqlite3(1.3.8)
* thor(0.18.1)
* tilt(1.4.1)
* treetop(1.4。 15)
* truncate_html(0.9.2)
* tzinfo(0.3.38)
* uglifier(2.3.2)
* warden(1.2.3)
* will_paginate(3.0.5)

当我尝试生成一个插件时, p>

  $ rails生成精炼厂:搜索
找不到生成器精炼厂:搜索。

我个人认为这是因为没有有效的宝石规格。但是我知道什么,哈哈。在编辑Gemfile与博客和搜索宝石后,当我执行$ bundle install时,它确实表示它们已成功安装。但是他们没有安装,之后我无法做任何事情,比如创建插件和数据库。



非常感谢你的帮助,我希望你能结束我的痛苦!

解决方案

我发现RefineryCMS引擎脚手架默认会创建一个无效的gemspec,并且您必须编辑它以包含您的名字

类似这样的:

  Gem :: Specification.new do | s | 
...
s.author ='您的名字在这里'
...

#运行时依赖关系
s.add_dependency'refinerycms-core' ,'〜> 2.1.0'

#开发依赖(通常用于测试)
s.add_development_dependency'refinerycms-testing','〜> 2.1.0'
end

或者甚至更好...



s.authors = ['Your Name Here']



自这是目前推荐的语法(尽管两者仍然有效)。


I can't install any engines. After installing the first event engines from guide, I had an error saying I don't have a valid gem spec.

Using refinerycms-events (1.0) from source at vendor/extensions refinerycms-events at /Users/lydia/Desktop/projects/cmsex/vendor/extensions/events did not have a valid gemspec. This prevents bundler from installing bins or native extensions, but that may not affect its functionality. The validation message from Rubygems was: authors may not be empty

Now whenever I try to install another engines, the command line says installation has been successful, but I can't find that gem on bundle show. I can't generate plugins and database.

I have added these lines to my Gemfile:

gem 'refinerycms-blog', '~> 2.1.0'

gem 'refinerycms-search', '~> 2.1.0'

This is my Gems included in the bundle:

    Gems included by the bundle:
  * actionmailer (3.2.16)
  * actionpack (3.2.16)
  * activemodel (3.2.16)
  * activerecord (3.2.16)
  * activeresource (3.2.16)
  * activesupport (3.2.16)
  * acts_as_indexed (0.8.3)
  * arel (3.0.3)
  * awesome_nested_set (2.1.6)
  * babosa (0.3.11)
  * bcrypt-ruby (3.1.2)
  * builder (3.0.4)
  * bundler (1.3.5)
  * coffee-rails (3.2.2)
  * coffee-script (2.2.0)
  * coffee-script-source (1.6.3)
  * decorators (1.0.3)
  * devise (2.2.8)
  * dragonfly (0.9.15)
  * erubis (2.7.0)
  * execjs (2.0.2)
  * friendly_id (4.0.10.1)
  * globalize (3.0.2)
  * hike (1.2.3)
  * i18n (0.6.9)
  * journey (1.0.4)
  * jquery-rails (2.3.0)
  * json (1.8.1)
  * mail (2.5.4)
  * mime-types (1.25.1)
  * multi_json (1.8.2)
  * orm_adapter (0.5.0)
  * paper_trail (2.7.2)
  * polyglot (0.3.3)
  * rack (1.4.5)
  * rack-cache (1.2)
  * rack-ssl (1.3.3)
  * rack-test (0.6.2)
  * rails (3.2.16)
  * rails-i18n (0.7.4)
  * railties (3.2.16)
  * rake (10.1.0)
  * rdoc (3.12.2)
  * refinerycms (2.1.1)
  * refinerycms-acts-as-indexed (1.0.0)
  * refinerycms-authentication (2.1.1)
  * refinerycms-core (2.1.1)
  * refinerycms-dashboard (2.1.1)
  * refinerycms-events (1.0)
  * refinerycms-i18n (2.1.0)
  * refinerycms-images (2.1.1)
  * refinerycms-pages (2.1.1)
  * refinerycms-resources (2.1.1)
  * routing-filter (0.3.1)
  * sass (3.2.12)
  * sass-rails (3.2.6)
  * seo_meta (1.4.0)
  * sprockets (2.2.2)
  * sqlite3 (1.3.8)
  * thor (0.18.1)
  * tilt (1.4.1)
  * treetop (1.4.15)
  * truncate_html (0.9.2)
  * tzinfo (0.3.38)
  * uglifier (2.3.2)
  * warden (1.2.3)
  * will_paginate (3.0.5)

When I try to generate a plugin, I get this:

$ rails generate refinery:search
Could not find generator refinery:search.

I personally think it's because not having a valid gem spec. But what do I know haha. When I do "$bundle install" after editing Gemfile with blog and search gem, it does say they have been installed successfully. But they are not installed and I can't do anything after that, such as creating plugins and database.

Thank you so much for your help and I hope you can end my misery!!

解决方案

I found that the RefineryCMS engine scaffold creates an invalid gemspec by default, and you have to edit it to include your name in the authors field before trying to install it.

Something like this:

Gem::Specification.new do |s|
  ...
  s.author            = 'Your Name Here'
  ...

  # Runtime dependencies
  s.add_dependency             'refinerycms-core',    '~> 2.1.0'

  # Development dependencies (usually used for testing)
  s.add_development_dependency 'refinerycms-testing', '~> 2.1.0'
end

or, even better...

s.authors = [ 'Your Name Here' ]

Since that's the current recommended syntax (although both still work).

这篇关于RefineryCMS引擎错误:没有有效的gemspec的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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