How can I use yield for template inheritance in erb? I want to use erb in a plain ruby CGI script and want to use a base template and subtemplate like it Rails wit
I don't think you can - Rails provides that infrastructure as part of actionpack.
What you may be able to do is take actionpack and add it into your script.
Alternatively you could roll a lightweight templating system yourself.
Alternatively alternatively use Rails or Merb or Sinatra.