From: John Joyce Date: 2008-07-09T01:48:55+09:00 Subject: Re: Ruby without rails? On Jul 8, 2008, at 11:39 AM, Vassilis Rizopoulos wrote: > Shashank Agarwal wrote: >> I'm trying to develop a small website, and was planning to use Ruby >> alone (I don't know much Rails, and wasn't planning on learning it >> for >> the project). Is there a way to run .rb files under a webserver. I'm >> developing the site on Windows and will eventually be running it on a >> unix platform with Apache. I tried using instantrails, but that >> didn't >> help. I even installed the fast-cgi module in Apache. When I run >> the .rb >> file, I simple see the code. This is the code I'm trying to run - >> >> print <<-HTMLEND >> >> >> Hello World >> >> >>

Hello World

>> >> >> HTMLEND >> > There are quite a few ways to do web apps without rails. > Check out Camping, Ramaze or Merb, they are all alternatives to > Rails as in they are WebApp frameworks. > Now, development would be done with the built in ruby webservers > (WebRick, Mongrel, Thin) and deployment is a much documented subject > (i.e. Ramaze in it's site has a whole bunch of deployment > possibilities, including Apache). > I would definitely take the time to learn any one of them, as > otherwise you *will* be reinventing the wheel for a lot of what you > are going to do. > Cheers, > V.- > > -- > http://www.braveworld.net/riva > > What the OP is probably looking for is something more like the way PHP is inlined. At the very least, you will want to look at the Ruby CGI library (not well documented) and some form of eRuby, ERB or Erubis or something similar.