If just want to process some basic commands in a web environment you
could create a form which simply re-displays itself.

Setup a class variable (or simply use the flash notification) to hold
the result of whatever you want to do and instead of redirecting to
show or index, redirect to new. Then display it in your view. You can
assign a blank value for the first run. A simple model could hold the
previous entries and you could iterate over this in the view if you
wanted to show history.

One word of caution though, make sure you have a good grasp on the
security implications before you expose your computer in this fashion.
One bad file i/o call can ruin what might have been a good day.

On Aug 28, 4:44 pm, chris_the_frog <[email protected]> wrote:
> Hi! I am a computer science student and I have a problem I just can't
> seem to find an answer to. I would like to embed a read-eval-print-
> loop in a website. Essentially, I'd like a window that mimics a
> console: the user types in some random text, it is processed, a value
> is returned and displayed, and then it waits for the user's input
> again*.  Exactly like a console.
>
> I am new to Ruby and I have only just begun looking at Rails. In fact,
> I have absolutely no experience in web programming whatever. So even
> if someone could just point me in the right direction, I'd appreciate
> it.
>
> * FYI, I am trying to create an online version of my research project:
> an interpreter and interactive environment for a small functional
> language.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to