# Newbie - Help Please

**URL:** <https://www.ruby-forum.com/t/newbie-help-please/54610>\
**Category:** Rails\
**Created:** [March 9, 2006, 10:48pm UTC](https://www.ruby-forum.com/t/newbie-help-please/54610 "2006-03-09T22:48:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 9, 2006, 10:48pm UTC](https://www.ruby-forum.com/t/newbie-help-please/54610/1 "2006-03-09T22:48:40Z")

</div>

I am just getting off the ground with RoR. (actually just walking out to  
the runway)  
I want to setup a development / test environment as close to the  
production environment as possible except for OS (Win XP for Dev, Linux  
for Prod).  
I have Apache, MySQL, PhP installed and operating close enough to the  
production environment that all the PhP stuff I’ve done in the past  
seems to work fine.  
I have installed Ruby, Gems, and Rails, and maybe (not quite sure)  
FastCGI on my home (development) machine running Windows XP.

There are two things that I need help with:

1. I need to use my development Apache Server for RoR development &  
testing as well as maintenance and improvements to my existing PhP based  
site. All of the apache configuration advice I have read seems to want  
to point apache only to a single RoR app by changing the document root.  
How can I make it so that i can go to www.myphpdomain.tst I get the php  
site, and when i go to www.myrailsdomain.tst I get the ralis app.  
Extending the concept, I’d like to be able to go to  
www.my2ndrailsdomain.tst and get a 2nd rails app. To date I’m using the  
host file to route www.myphpdomain.tst to 127.0.0.1. I don’t mind if  
the urls for the sites point to subordinate folders (like  
www.mydomain.tst/railsapp)

2)How can I tell if I have FastCGI installed and configured correctly  
(apache2)?

I know that I do not need to tackle these problems to learn RoR, but If  
I cannot tackle them then learning RoR may be a pointless exercise for  
me.

Thanks in advance!  
joe

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 9, 2006, 11:01pm UTC](https://www.ruby-forum.com/t/newbie-help-please/54610/2 "2006-03-09T23:01:52Z")

</div>

On 3/9/06, Joe P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I want to setup a development / test environment as close to the  
> production environment as possible except for OS (Win XP for Dev, Linux  
> for Prod). […] I know that I do not need to tackle these problems to learn  
> RoR, but If I cannot tackle them then learning RoR may be a pointless  
> exercise for me.

Honestly, the easiest thing to do, is use WebBrick on your development  
machine. The “different dev / prod environment” issues are _extremely_  
minor  
in most cases. With WebBrick, you access your Rails site at  
localhost:3000/  
and your PHP site at localhost:80/

How can I make it so that i can go to www.myphpdomain.tst I get the php

> site, and when i go to www.myrailsdomain.tst I get the ralis app.

I’d create a virtual host for myrailsdomain that points to  
/home/you/rails-app/public . For multiple rails apps, substitute  
“rails-app1” for “rails-app”.

How can I tell if I have FastCGI installed and configured correctly

> (apache2)?

Change public/.htaccess from “dispatch.cgi” to “dispatch.fcgi” and see  
what  
happens?

– Joshua

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 10, 2006, 12:03am UTC](https://www.ruby-forum.com/t/newbie-help-please/54610/3 "2006-03-10T00:03:25Z")

</div>

Josh on Rails wrote:

> Honestly, the easiest thing to do, is use WebBrick on your development  
> machine. The “different dev / prod environment” issues are _extremely_  
> minor  
> in most cases. With WebBrick, you access your Rails site at  
> localhost:3000/  
> and your PHP site at localhost:80/

\> 

> – Joshua

Thanks Joshua.  
I’d use WebBrick but I’m going to want to try to integrate some PHP  
scripts into the site as well… I don’t want to re-write the universe  
if I can avoid it.  
joe

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 10, 2006, 12:45am UTC](https://www.ruby-forum.com/t/newbie-help-please/54610/4 "2006-03-10T00:45:39Z")

</div>

Joe P. wrote:

> if I can avoid it.  
> joe

I am using lighttpd with fastcgi, the only trouble I had is that I  
needed to compile the fastcgi from source as the RPM wasn’t correct.  
But it has been working for some time now without any troubles at all,  
and php can also be used if needed.

It is reasonable fast, on my 800MHz computer it manages to serve a  
complex page (4 different tables involved) in about 0.7 secs, tested  
with the apache test program ‘ab’.

Regards Neil.

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 10, 2006, 6:05am UTC](https://www.ruby-forum.com/t/newbie-help-please/54610/5 "2006-03-10T06:05:08Z")

</div>

Josh on Rails wrote:

> On 3/9/06, Joe P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Thanks Joshua.  
> > I’d use WebBrick but I’m going to want to try to integrate some PHP  
> > scripts into the site as well…
> 
> Sure, but you’re going to link to the PHP pages, right?  
> “myphpdomain.tst/script.php”  
> or something, I think? How is that different/better than  
> “localhost:80/script.php” ?

I must confess that I am not yet familiar enough with RoR capabilities  
or limitations to adequately describe any particular problem. However,  
just as an example say I have an existing SMF forum and use their SSI  
PHP functions to display recent posts in pages that have their emphasis  
focused in areas other than the forum. I’d prefer to use these functions  
to the degree possible rather than re-inventing them in rials… perhaps  
I’m just being unrealistically lazy 😉  
joe

---

<div class="post-metadata">

**Author:** ![joep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/87869e/32.png) [@joep](https://www.ruby-forum.com/u/joep)\
**Post date:** [March 10, 2006, 4:11am UTC](https://www.ruby-forum.com/t/newbie-help-please/54610/6 "2006-03-10T04:11:01Z")

</div>

On 3/9/06, Joe P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks Joshua.  
> I’d use WebBrick but I’m going to want to try to integrate some PHP  
> scripts into the site as well…

Sure, but you’re going to link to the PHP pages, right?  
“myphpdomain.tst/script.php”  
or something, I think? How is that different/better than  
“localhost:80/script.php” ?
