Question

Im wondering how to go about creating an online IRB that runs in the browser. I have an idea to include an irb console in my blog and give the option for users to send code blocks in my tutorials directly into the irb console so they can play around with it.

_Why did this previously, but of course it is gone now: Cached Version

Was it helpful?

Solution

TryRuby is still available here, with source code at GitHub.

OTHER TIPS

Well, you could use the sandbox that _why created. But you'll need to be able to patch your ruby and it seems to only work on ruby 1.8.5 .

That's insanely dangerous. Don't do this. You expose your system to all sorts of vulnerabilities when you allow users to execute arbitrary Ruby code.

Anyway there are some client-side Ruby implementations in JavaScript/Flash. Take a look at HotRuby.

I would suspect you run Ruby in a sandbox to prevent "bad" commands being run.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top