如何让我的虚拟应用程序使用引擎的模板引擎? [英] How do I get my dummy app to use the Engine's template engine?
本文介绍了如何让我的虚拟应用程序使用引擎的模板引擎?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个正在开发的 Rails 引擎,gemspec 有这个:
I have a Rails Engine I'm working on and the gemspec has this:
s.add_development_dependency "rspec-rails"
s.add_development_dependency "combustion"
s.add_development_dependency "capybara"
s.add_development_dependency "factory_girl_rails"
s.add_development_dependency "ffaker"
s.add_development_dependency "draper"
s.add_runtime_dependency "sqlite3"
s.add_runtime_dependency "slim-rails"
s.add_runtime_dependency "sass-rails"
s.add_runtime_dependency "jquery-rails"
s.add_runtime_dependency "rails", "~> 3.2"
但是,在转到正确的控制器/操作时,我收到此错误:
However upon going to the correct controller/action I get this error:
Missing template countdown/subscriptions/index, countdown/application/index with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder]}. Searched in: * "/Users/krainboltgreene/Repository/ruby/countdown/spec/dummy/app/views" * "/Users/krainboltgreene/Repository/ruby/countdown/app/views"
注意到处理程序部分了吗?
Notice the handlers part?
推荐答案
我遇到了类似的问题,虚拟应用程序没有加载 Devise.我必须做的是在 config/application.rb
中 require 它,然后它就可以工作了.也许你只需要在那里 require 'slim'
就可以了?
I had a similar problem with the dummy application not loading Devise. What I had to do was require it inside config/application.rb
and then it worked. Perhaps you just need to require 'slim'
there and it will work too?
这篇关于如何让我的虚拟应用程序使用引擎的模板引擎?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文