NameError:未初始化的常量Rapidfire Engine安装在根应用程序路由上没有有效的gemspec

时间:2015-01-09 18:02:19

标签: ruby-on-rails-4.2 rapidfire-gem

我有一个名为Question Engine的引擎,它将rapidfire作为依赖项。 Rapidfire也是一个引擎。

在question_engine.gemspec中,我将gem作为开发和一般依赖

s.add_dependency "rapidfire", "~> 2.0.0"
s.add_development_dependency "rapidfire", "~> 2.0.0"

在我的root应用程序gemfile中我正在加载问题引擎,我的root应用程序在gemlist上有快速启动

group :development, :test do 

  gem 'question_engine', path: "vendor/engines/QuestionEngine"

end

rapidfire附带以下说明

$ bundle install
$ bundle exec rake rapidfire:install:migrations
$ bundle exec rake db:migrate
And if you want to customize rapidfire views, you can do

$ bundle exec rails generate rapidfire:views
Usage

Add this line to your routes will and you will be good to go!

mount Rapidfire::Engine => "/rapidfire"

在我的root app config / routes文件中我有这些

Rails.application.routes.draw do
  devise_for :admin_users, ActiveAdmin::Devise.config
  ActiveAdmin.routes(self)
  root 'home#index'
  devise_for :users

  mount FormulaEngine::Engine => "/formula_engine" 
  mount QuestionEngine::Engine, at: 'question_engine' 
  mount Rapidfire::Engine, at: "/rapidfire"
end

当我做rake路线时,我收到此错误

NameError: uninitialized constant Rapidfire

两天前工作了。我已经检查了我的提交,从那以后我只从事过服务器工作。

rapidfire生成器在root应用程序内运行良好。我已经迁移了表格。是的,迁移文件没有被复制到根应用程序,但是我看不到root应用程序如何看不到rapidfire存在?

我正在使用rails 4.2。根据他们的文档,宝石支持rails 4版本。

进行捆绑安装,收到此消息

question_engine at $ HOME / vendor / engines / QuestionEngine没有有效的gemspec。 这可以防止bundler安装bin或native扩展,但这可能不会影响其功能。 来自Rubygems的验证消息是:   “FIXME”或“TODO”不是描述

这是我的gemspec

$:.push File.expand_path("../lib", __FILE__)

# Maintain your gem's version:
require "question_engine/version"

# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
  s.name        = "question_engine"
  s.version     = QuestionEngine::VERSION
  s.authors     = ["somebody"]
  s.email       = ["somebody@gmail.com"]
  s.homepage    = "TODO"
  s.summary     = "TODO: Summary of QuestionEngine."
  s.description = "TODO: Description of QuestionEngine."
  s.license     = "MIT"

  s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
  s.test_files = Dir["test/**/*"]

  s.add_dependency "rails", "~> 4.2.0"
  s.add_dependency "rapidfire", "~> 2.0.0"

  #s.add_development_dependency "rapidfire", "~> 2.0.0"
  s.add_development_dependency "sqlite3"
end

0 个答案:

没有答案