ruby-on-railsrubytilt

How to registered engine from tilt in Ruby on Rails application?


I have a Ruby on Rails application. I don't understand how to register an engine from gem Tilt. Of course, I installed and required tilt. But, when I send http-request, the application doesn't know about tilt and its engines. I have the error:

Missing template welcome/index, application/index with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder, :haml]}

I understand that my application has only 7 handlers for "[:erb, :builder, :raw, :ruby, :coffee, :jbuilder, :haml]", and it doesn't have handles from tilt.

How to include an engine from tilt to list of view handles?


Solution

  • Tilt is a "Generic interface to multiple Ruby template engines", not an engine itself. The use case you described looks like standard rails, you need to add the file "welcome/index.html" yourself.

    If I misunderstood your problem, can you provide more information?