The problem I want to solve is that Erubis (the default Rails template
engine) parses html unprofessionally - there are many blank lines and
space characters are left in the result page. -%> (minuses in tags) do
not help.
I do not want to switch Haml or Slim because I prefer plain html.
I want to try out Tenjin
(http://www.kuwata-lab.com/tenjin/rbtenjin-users-guide.html) but do not
know how to make it to be the default template engine.
By Rails guide it is done like this:
config.generators do |g|
g.template_engine(:tenjin)
end
But it doesn't work. I get an error:
# in my Gemfile
gem("tenjin")
# now generate
C:\ruby\Sites\Test>rails generate controller test
create app/controllers/test_controller.rb
error tenjin [not found] # NOT FOUND
invoke test_unit
create test/functional/test_controller_test.rb
invoke helper
create app/helpers/test_helper.rb
invoke test_unit
create test/unit/helpers/test_helper_test.rb
invoke assets
invoke js
create app/assets/javascripts/test.js
invoke scss
create app/assets/stylesheets/test.css.scss
How to turn off the default erubis and turn on Tenjin?
Or if there is some magic how to turn off blank spaces of Erubis, it is
even better.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment