From: Chad Perrin Date: 2008-10-20T03:28:00+09:00 Subject: Re: How to go from a ruby script to a working website? --MfFXiAuoTsnnDAfZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 16, 2008 at 06:19:14PM +0900, Ralph Wood wrote: >=20 > My main interest is developing web stuff, and for that I started > learning programming through PHP. However, I discovered Ruby and > immediately fell in love with it. >=20 > I started following Chris Pine's Learn to Program and with the knowledge > I got so far, I started building a few very simple programs of my own. > The thing is that they're all limited to the Terminal (I have a mac), > but what I really want is to use them through a web interface (inputs, > forms, submit, etc) so I can also experiment with Javascript/AJAX. >=20 > However, I have no clue how to do that and can't seem to find > information on it anywhere. It seems the only way to access Ruby > programs through a webpage is with the aid of frameworks like Rails and > Merb, and they seem like too much trouble for what would be a simple > one-page app. I guess could use Camping or only the Merb-core, but I > would like to understand exactly what I'm doing, and just basically be > able do it all by myself. For extremely simple stuff -- like turning a basic command-line utility into a Web application -- I use the hell out of eRuby. The Wikipedia page for eRuby offers a little information about it, including some "hello world" level examples and brief mentions of three different implementations: https://secure.wikimedia.org/wikipedia/en/wiki/ERuby The way it's used, once you get it working, is surprisingly similar to how PHP is used with mod_php on most Webservers. The difference is primarily that it uses Ruby instead of PHP (obviously), in terms of how one interacts with it. There are a few gotchas in making the transition from PHP to eRuby, though, as a bunch of stuff works subtly differently (such as default paths). --=20 Chad Perrin [ content licensed PDL: http://pdl.apotheon.org ] Bill McKibben: "The laws of Congress and the laws of physics have grown increasingly divergent, and the laws of physics are not likely to yield." --MfFXiAuoTsnnDAfZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkj7elgACgkQ9mn/Pj01uKVr3ACfS/AIdNRYlabc0jPUrJ85Cezk 6tIAoLbnqMEuJfPAGmUsNFccMhHk1hMg =fwjZ -----END PGP SIGNATURE----- --MfFXiAuoTsnnDAfZ--