I would like to generate a HTML page with Ruby, and I am curious if it is possible to mix somehow the static part HTML and the Ruby statements which generate the dynamic parts. Is there a godd technique for doing this?
Yes it is possible.
change your file name to
<form action="<%= ruby here %>" method="get" > <%= rand() %> <!-- Pure ruby here --> <%= submit_tag "Search", :name => nil%> <!-- options in ruby --> </form>