K
K
Kir Shatrov2011-02-07 17:17:23
Ruby on Rails
Kir Shatrov, 2011-02-07 17:17:23

Setting up Rails for Apache

Hello.
Installed rvm, everything is fine. Made rails new example.

Further, in theory, you need to throw .htacces into public with something like this: And register /public as DocumentRoot. But the problem is this: dispatch.fcgi (and dispatch.cgi too) are missing. Where to get them? Software: Ubuntu Server 10.04 64-bit, Ruby 1.9.2, Rails 3.0.3 and moderately crooked hands.

AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)/!$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
ErrorDocument 500 "Application error Application failed to start properly"





Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
elisium, 2011-02-07
@RazoR_Empire

I did not understand why you need .htaccess. Do you want your rails application to run under apache? Have you installed the passenger module?
I myself am new to rails, but I managed to make several new server setups for development, I never had to do anything related to what you wrote.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question