From: Fahim Farook Date: 2006-12-27T14:44:56+09:00 Subject: Re: External Ruby Script in HTML Naked Sushi wrote: > This probably has a simple answer, but I don't know it. > Let's say I have a ruby script called hello.rb > #!/usr/bin/ruby > def greeting () > return "Hello world!" > end I believe what you're looking for is explained in these documents: http://www.rubycentral.com/book/web.html http://nubyonrails.com/articles/2006/02/01/rjs-and-content-type-header The first method is the easy one and will do exactly what you want - at least, I think so since I have a similar requirement. I need to be able to run Ruby on one server but be able to call a script on the first server from a different server's HTML content. I've done something similar with Python and PHP and it worked fine. So I believe the first link examples should work as well though I still haven't tried it. The second document about RJS appears to provide a more complicated way to do the same thing but again I'm not absolutely certain since I haven't tried it out :p Incidentally, if you set up Ruby to output HTML in the above fashion, the example call you used: > would have to be done as follows: Hope this helps, or at least puts you on the right track :) Fahim -- Posted via http://www.ruby-forum.com/.