ruby-on-railstemplate-enginerails-enginesslim-lang

How do I get my dummy app to use the Engine's template engine?


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?


Solution

  • 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?