# RoR uses something rather than erb or eRuby?

**URL:** <https://www.ruby-forum.com/t/ror-uses-something-rather-than-erb-or-eruby/115819>\
**Category:** Rails\
**Created:** [September 28, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/ror-uses-something-rather-than-erb-or-eruby/115819 "2007-09-28T20:01:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [September 28, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/ror-uses-something-rather-than-erb-or-eruby/115819/1 "2007-09-28T20:01:02Z")

</div>

it seems that RoR doesn’t use erb or eRuby to generate its output for  
rhtml?

the program erb and the description of eRuby at

[http://www.eruby.info](http://www.eruby.info)

both said that

\<% print “foo bar” %\> or \<% puts “hello” %\>

will be placed into the output…

but currently for RoR, it won’t…

only \<%= expr %\> is doing it and it cannot be print or puts, but the  
evaluated value of expr.

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [September 28, 2007, 8:16pm UTC](https://www.ruby-forum.com/t/ror-uses-something-rather-than-erb-or-eruby/115819/2 "2007-09-28T20:16:45Z")

</div>

SpringFlowers AutumnMoon wrote:

> it seems that RoR doesn’t use erb or eRuby to generate its output for  
> rhtml?
> 
> the program erb and the description of eRuby at
> 
> [http://www.eruby.info](http://www.eruby.info)
> 
> both said that
> 
> \<% print “foo bar” %\> or \<% puts “hello” %\>

They go into STDOUT, hence out your program. They don’t put anything  
into the returned string. Only \<%= … %\> does that.

So, yes RoR definitely uses eRB.

–  
Phlip  
[http://www.oreilly.com/catalog/9780596510657/](http://www.oreilly.com/catalog/9780596510657/)  
^ assert\_xpath

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [September 29, 2007, 4:09pm UTC](https://www.ruby-forum.com/t/ror-uses-something-rather-than-erb-or-eruby/115819/3 "2007-09-29T16:09:35Z")

</div>

Phlip wrote:

> SpringFlowers AutumnMoon wrote:
> 
> > it seems that RoR doesn’t use erb or eRuby to generate its output for  
> > rhtml?
> > 
> > the program erb and the description of eRuby at
> > 
> > [http://www.eruby.info](http://www.eruby.info)
> > 
> > both said that
> > 
> > \<% print “foo bar” %\> or \<% puts “hello” %\>
> 
> They go into STDOUT, hence out your program. They don’t put anything  
> into the returned string. Only \<%= … %\> does that.
> 
> So, yes RoR definitely uses eRB.

ah, i see…

c:\> erb foo.txt

prints out both because one is the processed evaluated value and one is  
the STDOUT.

but when erb is in RoR, then the evaluated value goes to the HTML code  
but the STDOUT goes to the console.
