# Newbie question - verifying it works right

**URL:** <https://www.ruby-forum.com/t/newbie-question-verifying-it-works-right/48781>\
**Category:** Rails\
**Created:** [November 24, 2005, 5:06pm UTC](https://www.ruby-forum.com/t/newbie-question-verifying-it-works-right/48781 "2005-11-24T17:06:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tylerc083](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@tylerc083](https://www.ruby-forum.com/u/tylerc083)\
**Post date:** [November 24, 2005, 5:06pm UTC](https://www.ruby-forum.com/t/newbie-question-verifying-it-works-right/48781/1 "2005-11-24T17:06:03Z")

</div>

I’m running apache 1.x on os x tiger.

I installed RoR following this website:  
[http://www.tonyarnold.com/articles/2005/08/10/rolling-with-ruby-on-rails-on-mac-os-x-tiger-for-beginners](http://www.tonyarnold.com/articles/2005/08/10/rolling-with-ruby-on-rails-on-mac-os-x-tiger-for-beginners)

I’ve got apache set up to point to the right directoy, and the virtual  
host is created properly (ie, i made a virtual directoy named  
‘rails\_dev’ to point to the public folder within the Rails installation)

So, when I put this in my URL:  
http://rails\_dev/index.html

I get the  
“Congratulations, you’ve put Ruby on Rails!”

However, if I just put ‘http://rails\_dev/’ I get:  
Application error  
Rails application failed to start properly"

And in my apache error log it has this:  
mod\_rewrite: maximum number of internal redirects reached. Assuming  
configuration error. Use ‘RewriteOptions MaxRedirects’ to increase the  
limit if neccessary.

Inside my .htaccess file I have this:  
RewriteRule ^$ index.html [QSA]  
RewriteRule ^([^.]+)$ $1.html [QSA]  
RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteRule ^(.\*)$ dispatch.fcgi [QSA,L]  
RewriteBase /test/

\*note - I’ve used RewriteBase of rails\_dev thinking it may have been  
with the URL, but I still get the same error

Also, when I try to run dispatch.cgi, I recieve this error:  
Routing Error  
Recognition failed for “/dispatch.cgi”

Any ideas/help? Anything that someone needs that I didn’t provide? Let  
me know, I’d really like to try developing in ror… but just getting  
started (with any language) always seems like the biggest hurdle…heh

Thanks in advance!  
Tyler

---

<div class="post-metadata">

**Author:** ![tylerc083](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@tylerc083](https://www.ruby-forum.com/u/tylerc083)\
**Post date:** [November 25, 2005, 4:08am UTC](https://www.ruby-forum.com/t/newbie-question-verifying-it-works-right/48781/2 "2005-11-25T04:08:08Z")

</div>

tyler,  
not sure why http://rails\_dev/ points you to rails, but I think you  
maybe getting “recognition for dispatch.CGI” because you have a  
rewrite rule only for dispatch.FCGI

hope this helps (i’m a newbie too)

- Oliver

2005/11/24, tyler craft [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![tylerc083](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@tylerc083](https://www.ruby-forum.com/u/tylerc083)\
**Post date:** [November 25, 2005, 5:10am UTC](https://www.ruby-forum.com/t/newbie-question-verifying-it-works-right/48781/3 "2005-11-25T05:10:29Z")

</div>

thanks for the response.

I should have explained more. My current setup is that I have a number  
of virtual hosts set up with apache. so for instance, i manage a  
website [freeformfilm.org](http://freeformfilm.org). I have set up a virtual host called  
freeformfilm\_dev which points to /Users/tyler/Sites/freeformfilm/dev/

This way I don’t have to keep doing localhost/freeformfilm/dev/ to get  
to the site, and in my files, if I start a path with /, I wouldn’t go to  
localhost, but rather the root of the dev folder. Although from the  
.htaccess file that Rails made, it looks like I could have done this in  
that file with the RewriteBase… but that is another topic…

I’ve made (what I think) is a little progress. I’ve cleared up the  
rewrite issues.

So I have a virtual host set up for rails\_dev to point to  
/Users/tyler/Rails/Test/public/

When I go to this, the Rails welcome page comes up.

I even made a hello.cgi file with this that works:  
#!/usr/bin/ruby  
print “Content-type: text/html\r\n\r\n”  
print “Hello World!\r\n”

I copied this file and made it hello.fcgi to see what would happen, but  
my error log keeps coming back with this in an endless loop (or until I  
restart apache):

[warn] FastCGI: (dynamic) server  
“/Users/tyler/Rails/Test/public/hello.fcgi” restarted (pid 19339)

And when I tried to open the dispatch.cgi I get this in the browser:  
Routing Error

Recognition failed for “/dispatch.cgi”

Perhaps I just haven’t got my head around how ror works. Should I even  
be concerned about this? Or since the .cgi file worked… that just  
means I have Ruby working right, but not Rails?

Again, thanks for the response.

---

<div class="post-metadata">

**Author:** ![tylerc083](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@tylerc083](https://www.ruby-forum.com/u/tylerc083)\
**Post date:** [November 26, 2005, 3:41pm UTC](https://www.ruby-forum.com/t/newbie-question-verifying-it-works-right/48781/4 "2005-11-26T15:41:46Z")

</div>

tyler craft wrote:  
[…]

> Any ideas/help? Anything that someone needs that I didn’t provide? Let  
> me know, I’d really like to try developing in ror… but just getting  
> started (with any language) always seems like the biggest hurdle…heh

For learning Rails on OS X, Locomotive [1] + TextMate [2] is a great  
combination. Don’t worry about hooking up to Apache until you really  
need to.

regards

Justin

[1] [http://locomotive.sourceforge.net/](http://locomotive.sourceforge.net/)  
[2] [http://www.macromates.com/](http://www.macromates.com/)
