# Displaying ruby content in rhtml

**URL:** <https://discuss.rubyonrails.org/t/displaying-ruby-content-in-rhtml/37904>\
**Category:** rubyonrails-talk\
**Created:** [January 3, 2009, 12:08am UTC](https://discuss.rubyonrails.org/t/displaying-ruby-content-in-rhtml/37904 "2009-01-03T00:08:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [January 3, 2009, 12:08am UTC](https://discuss.rubyonrails.org/t/displaying-ruby-content-in-rhtml/37904/1 "2009-01-03T00:08:28Z")

</div>

> Hi everyone,
> 
> I am a newbie to RoR. I installed the Instant Rails package 1.7, and with scaffold, I was able to create and connect to a database. However, when I embed some code in rhtml(list.rhtml in the tutorial there), it does not display in browser. I can see the html part on the screen without problem, but the ruby part does not get processed at  
> all. When I try a simple rhtml file such as below,

\<% puts ... %\> or \<% print ...%\> achieves very little (at best it will  
output to your server's log file). You need to be using \<%= which inserts the result of evaluating it's  
contents, ie \<%= Time.now %\>

Fred
