Problem: Getting Rails to run on apache

O

one man army

hello. I need some help getting rails to run on apache2/red hat. Made
the correct alias and directory in the .conf, but when I point the
browser to the directory it gives me a 404 on the dispatch.cgi. I have
not added fastcgi. i think im missing something basic. possibly
something in .htaccess

pointers appreciated
 
O

one man army

one man army said:
hello. I need some help getting rails to run on apache2/red hat. Made
the correct alias and directory in the .conf, but when I point the
browser to the directory it gives me a 404 on the dispatch.cgi. I have
not added fastcgi. i think im missing something basic. possibly
something in .htaccess

pointers appreciated

I got a little further, now the dispatch.cgi is being invoked, but I get
an internal error 500. ugh.

---
Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator, xxx and inform them of the time
the error occurred, and anything you might have done that may have
caused the error.

More information about this error may be available in the server error
log.
Apache/2.0.46 (Red Hat) Server at www.mocana-release.com Port 80
 
K

Kevin Brown

I got a little further, now the dispatch.cgi is being invoked, but I get
an internal error 500. ugh.

---
Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator, xxx and inform them of the time
the error occurred, and anything you might have done that may have
caused the error.

More information about this error may be available in the server error
log.
Apache/2.0.46 (Red Hat) Server at www.mocana-release.com Port 80

You'll find more help and more quickly over at the Rails list:
http://lists.rubyonrails.org/mailman/listinfo/rails

Hope you get it fixed though!
 
O

one man army

The oldest problem known to computers... CR-LF vs \n !
but with httpd.conf and .htaccess throwing constant doubt, it
was never clear. What an exercise in frustration. The files had come
from Windows, and got sftp'd to the Linux machine. No one sustpected.
In anested heirarchy and no suffixes, not that easy to fix, either.

Here are some resources that opened up during the frantic search:

IRC - not, no one jumped in. REALLY hard to read. Shizo in a window...

<http://lists.rubyonrails.org/mailman/listinfo/rails>
<http://www.ruby-forum.com>
<http://wiki.rubyonrails.com/rails/pages>

<http://66.102.7.104/search?q=cache:M7NBv8GLChEJ:www.numberporn.com/archi
ves/000118.php+htaccess+error+rails&hl=en>
<http://httpd.apache.org/docs/1.3/misc/rewriteguide.html>

hth
 
C

Corey Jewett

A little shell lovin' mixed with Ruby would have seen you through.
The find command is incredibly powerful, but set aside a day or two
for digging through the man page. :)

$ cd /root/of/cr-lf/nightmare
$ find . -name '*.conf' -exec ruby -pi -e 'sub(/\r\n/,"\n")' {} \;

That will walk through the tree and exec that ruby bit against every
file whose name matches *.conf. Note that you need all the gunk all
the way to the last semicolon.

Corey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,197
Messages
2,571,041
Members
47,643
Latest member
ashutoshjha_1101

Latest Threads

Top