From: Brian Candler Date: 2011-10-07T03:52:39+09:00 Subject: Re: How to upload a simple ruby file to a webpage T J Pereira wrote in post #1025373: > I have finally managed to program simple formulae in Ruby for my work.My > problem now is how to upload this on to my web page and use it online in > an interactive manner or as a standalone file similar to an .exe or some > other packaged file. Yes i have read about gems, RoR, Sinatra and > smaller webframe work etc..but how do i do it with a file. If you want an application "on [your] web page and use it online" then it needs to be a web application: something which accepts its input from a web browser using HTTP and returns its results as HTTP. So you need to write an application which works in that way - the simplest way being with something like Sinatra, which takes care of the HTTP nuts and bolts for me. Then you find a web server which supports rack for hosting it. If you have a web server which supports only CGI then you can instead write it as a CGI application. What you've written is a script which uses "gets" and "puts". I can assure you that it is not going to run as a web app, period. (Well, there used to be a "try ruby" website which let you post ruby scripts directly in, I don't know if it still exists - but I doubt that's what you're looking for) -- Posted via http://www.ruby-forum.com/.