One drawback of using ERB for general string interpolation is that ERB is really aimed at creating HTML. The result will be a lot of encoding problems when you forget all the same and get confused as to why your ampersand characters are bigger, smaller, etc. Become crippled.
I think there will be more computational overhead for ERB, but that may not matter.
Also, if you put inline ERB inside Ruby, you end up with Ruby inside ERB inside Ruby (and maybe there will be more levels when calling methods from ERB), and that will be a bit confusing mess. Think of the poor souls who will need to support your code, said that the poor soul may be you.
UPDATE You can use #{} for simple HTML templates (see Mustache for something like this), but it would be difficult and rather ugly to create a repeating section; repeating sections are fairly common in HTML templates, so this should be easy and natural for the HTML template system. With ERB, you can simply:
<% a.each do |e| %> <% end %>
but it will be a mess in the interpolation #{} . You would also end up making #{html(blahblah)} all the time, and most people will forget.
In addition, โ#โ has special meaning in URLs and another special meaning in CSS (where curly braces also have special meaning); URL snippets and CSS snippets are pretty common in HTML templates, so you'll always worry about mixing things. This particular nastiness bit is likely to be a problem only when using #{} to create a CSS selector or fragment in a URL, but this is enough to make it cumbersome.
source share