I have a small Ruby script that I want to run by visiting a page in a browser. This might seem like a dumb question but what's the easiest way to accomplish this? I haven't found very good documentation on how to get Ruby working with Apache so I'm open to any suggestions at this point.
-
Terminology nitpick: server-side applications don't run in the browser, they run on the server. The only programming language that runs in the browser is javascript (and vbscript, I suppose).sepp2k– sepp2k2011-01-27 19:44:47 +00:00Commented Jan 27, 2011 at 19:44
-
1mod_ruby embeds ruby in the apache web server.miku– miku2011-01-27 19:46:21 +00:00Commented Jan 27, 2011 at 19:46
-
@sepp2k: I've edited my language. @The MYYN: Have you gotten that to actually work yourself? I haven't had success with it.Jason Swett– Jason Swett2011-01-27 19:47:35 +00:00Commented Jan 27, 2011 at 19:47
Add a comment
|
1 Answer
I suggest Sinatra. As shown on that page, it's very lightweight, and Apache is not even necessary. As you get to needing more performance you might use Nginx or Apache as a reverse proxy (serving your static files quickly) and something like Thin to make your application run faster.
But for now, just start using Sinatra. As shown on the home page, you can get started in just a few lines.