Ruby and Python in the Browser

Getting Started

Include the http://gestalt.ironruby.com/d1/dlr-20091111/dlr.js file on your page to enable Ruby and Python script-tags on the HTML page:

<html>
  <head>
    <script type="text/javascript" src="http://ironruby.com/dlr/dlr.js"></script>
  </head>
  <body>
    <script type="text/ruby">
      window.alert "Hello World from Ruby"
    </script>
  </body>
</html>

Try out some simple examples: ruby | python | xaml | animation | final

And take a look at the paper: Back to "Just-Text"

Custom Installation

Download the redistributable package

Place the package anywhere on your webserver, but keep in mind if you have to reference dlr.js with a path that's different than "../dlr.js", you'll have to add this to your HTML file before referencing dlr.js:

<script type="text/javascript">
  window.DLR = {}
  DLR.path = "../../path/to/dlr" // where ../../path/to/dlr.js exists
</script>

However, if you don't want to add this to every file, you can also add it to the top of dlr.js