javascriptruby-on-railsrubyruby-on-rails-3google-nativeclient

Ruby in web browser


I'm looking for some solution of next problem: Now i'm developing an Rails app. I want to have possibility to code in Ruby at browser and then execute that code in my Rails app.

Are there some ready solutions?

UPD:

  1. what about code highlighting?
  2. what about Native Client?

Solution

  • https://github.com/codegram/rack-webconsole

    Or you could simply pass the Ruby code to the server via post and call eval eval(CODE).

    You should note that especially the second way is very insecure since it gives the executing code complete access to your system.

    If this really has to be done "Locking Ruby in the Safe" could help secure it.

    EDIT:

    For syntax highlighting take a look at Code Mirror and ACE. Both are decent source code editors with ruby support.