Forum: Ruby Problem: Getting Rails to run on apache

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
newsAT (Guest)
on 2005-12-01 09:41
(Received via mailing list)
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
newsAT (Guest)
on 2005-12-01 11:10
(Received via mailing list)
In article <removed_email_address@domain.invalid>,
 one man army <removed_email_address@domain.invalid> wrote:

> 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
blargity (Guest)
on 2005-12-01 15:14
(Received via mailing list)
On Thursday 01 December 2005 03:07, one man army wrote:
>
> 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!
newsAT (Guest)
on 2005-12-02 04:34
(Received via mailing list)
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:ww...
ves/000118.php+htaccess+error+rails&hl=en>
<http://httpd.apache.org/docs/1.3/misc/rewriteguide.html>

 hth
corey (Guest)
on 2005-12-02 18:16
(Received via mailing list)
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
This topic is locked and can not be replied to.