#1
  1. Null Pointer Exception
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2006
    Location
    america
    Posts
    3,355
    Rep Power
    1579

    Ruby on rails, finally doing it


    i've been following this introductory guide for ruby on rails

    http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=2

    ive been going along nicely i feel like i know what im doing,

    I'm just curious about how i can have it integrate with my apache server (which is currently hooked for doing php development)

    id like to not have to run 2 servers as it seems kind of funny.

    the only issue i could see is ive been following the guide and putting my stuff inside c:\rails

    all of my php stuff is inside c:\www

    and c:\www is my web root directory, i guess i need to create a different port on apache that goes to the directory root that the ruby on rails webserver is going to (which im not very sure where it goes actually)

    i dont know if this is more of an apache question or what

    edit:

    i nosed around and found this

    http://api.rubyonrails.org/
    Rails uses the built-in web server in Ruby called WEBrick by default, so you donít have to install or configure anything to play around.

    If you have lighttpd installed, though, itíll be used instead when running script/server. Itís considerably faster than WEBrick and suited for production use, but requires additional installation and currently only works well on OS X/Unix (Windows users are encouraged to start with WEBrick). We recommend version 1.4.11 and higher. You can download it from www.lighttpd.net.

    If you want something thatís halfway between WEBrick and lighttpd, we heartily recommend Mongrel. Itís a Ruby-based web server with a C-component (so it requires compilation) that also works very well with Windows. See more at mongrel.rubyforge.org/.

    But of course its also possible to run Rails with the premiere open source web server Apache. To get decent performance, though, youíll need to install FastCGI. For Apache 1.3, you want to use mod_fastcgi. For Apache 2.0+, you want to use mod_fcgid.

    See wiki.rubyonrails.com/rails/pages/FastCGI for more information on FastCGI.
    --
    the tone of that paragraph is that it wont run too cool on apache and i should use lighthttpd.

    will fastcgi help too much?

    the final server if i do develope a pretty cool ruby thing will be on a 256 megabyte VPS.

    any recomendations as far as that?
    Last edited by misterdanny; December 31st, 2006 at 04:00 AM.
  2. #2
  3. I do PHP. The drug.
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Location
    Southern California, USA
    Posts
    231
    Rep Power
    11
    FastCGI with Apache works fine if you want to use Apache. I am on dreamhost currently and it runs well. I've never setup FCGI w/ Apache though so I can't help you there, sorry.

    I just wanted to assure you fcgi with apache is fine.

IMN logo majestic logo threadwatch logo seochat tools logo