Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8204679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:58:11+00:00 2026-06-07T07:58:11+00:00

I am learning Rails and I have seen these template engines. I have no

  • 0

I am learning Rails and I have seen these template engines. I have no experience with them (only erb).

But as I am a beginner, I am really confused. Which one do you suggest and why? Erb, Haml or Slim? Please tell your reason for preferring one over the others. And if you have any other recommendations, please let us know.

EDIT:
I am NOT looking for a winner here. I just want to hear your opinions about them, their syntax, speed of execution, and so on.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:58:12+00:00Added an answer on June 7, 2026 at 7:58 am

    ERB is good mainly if you have a web designer that will work on plain HTML and does not know either haml or slim. This way they can write HTML and you can embed ruby logic with the proper tags.

    If you work on both HTML and ruby logic, or your designer is ready to learn something new (like HAML) I’d go for HAML. It is a lot more ruby-friendly, reduces char count by much and a lot more readable than ERB.

    For example (taken from official HAML site):

    In ERB your view will look like this:

    <div id="profile">
      <div class="left column">
        <div id="date"><%= print_date %></div>
        <div id="address"><%= current_user.address %></div>
      </div>
      <div class="right column">
        <div id="email"><%= current_user.email %></div>
        <div id="bio"><%= current_user.bio %></div>
      </div>
    </div>
    

    While in HAML it will look like this:

    #profile
      .left.column
        #date= print_date
        #address= current_user.address
      .right.column
        #email= current_user.email
        #bio= current_user.bio
    

    A lot cleaner!

    As for the difference between HAML and SLIM – I never really worked with SLIM but I guess it is a matter of taste – take a look at both syntaxes and decide which looks better in your eyes. I don’t think there is a definite winner between those two (HAML/SLIM).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just learning Ruby on Rails (no prior Ruby experience) I have these models
I am still learning Ruby on Rails, but have a general question about using
I have been learning Ruby (Rails/Sinatra) and it's good very good but OMFG how
I am learning Rails, at the moment, but the answer doesn't have to be
Quick question: I have been learning ruby on rails and http://guides.rubyonrails.org/index.html is really good
Recently I have started learning rails and was a little surprised that the default
I have just started learning Rails, is it required for me to learn CoffeeScript
I'm just learning ruby on rails and I have a table of user roles
I am coming from the world of PHP and am learning Ruby/Rails. I have
I am learning to use mysql for rails apps, and I finally have been

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.