On 12 March 2016 at 17:46, Bigmac Turdsplash <li...@ruby-forum.com> wrote:
> Colin Law wrote in post #1182139:
>> On 12 March 2016 at 07:34, Bigmac Turdsplash <li...@ruby-forum.com>
>> wrote:
>>>
>> The web page and any javascript in it run in the browser.  Which
>> computer do you want the ruby script to run on?  The server running
>> your rails app or the client PC running in the browser?
>>
>> If you answer is the PC running the browser then, for a start, how
>> would you even know that ruby is installed on that PC?  It is for
>> exactly that sort of task that javascript was invented.
>>
>> Colin
>
> no, i want to run ruby code on the server and display the console output
> to the viewer in real time as each line is displayed
>
> <%=# if button is pressed=>
> <button type="button" class="btn btn-default">button</button>
> <p><%=100.times do |x| puts x; sleep 1; end=></p>
>
> i dont know what im doing, but im excited to learn...

Basically no, you can't do that.  There are ways you could make it
look as if that is what is happening, but that would not be the sort
of thing a beginner could knock off easily.  I would get the hang of
the conventional web architecture before trying to push the
boundaries.

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsBeATfpvb8iyNv2043gvLQUGTEyrb%3DR_yX5_sx%2BW81xQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to