From: David Vallner Date: 2007-02-20T23:28:24+09:00 Subject: Re: Help Me On Tue, 20 Feb 2007 15:06:21 +0100, Decky Fiyemonda wrote: > Hi everyone iam new here but iam not in ruby. > > How to make Web page with Ruby, and is ruby can run along with PHP? > A) *twitch* B) If you're used to PHP, probably the easiest way would be to use mod_ruby [http://www.modruby.net/en/], or WEBrick [http://www.webrick.org/]. The latter site has some code in the "HTTP server" section that should get you started. I think[1] WEBrick by default will handle files with the extension .rhtml as ERB files, which are the closest you'll get to the way PHP works - the basic difference is that you write <% your_code_here %> instead of . I've never installed mod_ruby, so someone else (e.g. Google) can give you a step-by-step walkthrough through the process. Stating what operating system you use would help if you decide to go that way. C) Depends on how you define "run along with". If you use mod_ruby (more complicated to install), you can run both the languages with one Apache server, probably depending on the file extension. This is where WEBrick is more complicated, because it will be a Ruby-specific server independent of your Apache. But it's possible (and fairly easy once you understand the principles) to set up Apache so that it asks a running WEBrick to handle your .rhtml files, using either mod_proxy (if all your .rhtml files are in a single directory you're serving with WEBrick), or mod_rewrite (this is a more complicated solution, where you'll have both Apache or WEBrick serve the same directory, but only tell Apache to turn to WEBrick for the ones whose filenames end in .rhtml). [http://httpd.apache.org/docs/2.2/urlmapping.html] [http://httpd.apache.org/docs/2.2/mod/mod_proxy.html] [http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html] There are many, many other ways to make Ruby-based websites, but I think these are the easiest to get you going given that you mention PHP and based on an uneducated guess of mine at your current level of competence. (I'm sure others will chime in describing those.) David Vallner