[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby + Apache, scripts not being interpreted

nobrow

10/13/2007 10:08:00 AM

I am trying to get Ruby running on Apache. I may or may not have a
problem. What do you think?

I have a test site called ruby-test set up with a vhost. When I go to
rails-test/ I see the "Welcome Aboard" page. But when I click the
"About your application's environment" link the script doesnt get
interpreted ... I just see it as text. I havent gone any further than
this, as I have been trying to get that script to run.

rails-test/public/.htaccess looks like:

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

The vhost .conf for the site looks like:

<VirtualHost *:80>
DocumentRoot "/var/www/webroot/rails-test/public"
ServerName rails-test
<Directory "/var/www/webroot/rails-test/public">
Options ExecCGI FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Is the problem that the .rb file that the link points to is in a
directory that doesnt have +ExecCGI set? What must I do to fix this?
Am quite stuck.

I guess one solution is to get mod_ruby working right? But I cant
figure out how to check if it is working already, or find a set of
instructions how to install it.

Help greatly appreciated, thanks.

4 Answers

nobrow

10/22/2007 5:03:00 PM

0

On Oct 13, 11:07 am, nobrow <nob...@gmail.com> wrote:
> I am trying to get Ruby running on Apache. I may or may not have a
> problem. What do you think?
>
> I have a test site called ruby-test set up with a vhost. When I go to
> rails-test/ I see the "Welcome Aboard" page. But when I click the
> "About your application's environment" link the script doesnt get
> interpreted ... I just see it as text. I havent gone any further than
> this, as I have been trying to get that script to run.
>
> rails-test/public/.htaccess looks like:
>
> AddHandler fcgid-script .fcgi
> Options +FollowSymLinks+ExecCGI
> RewriteEngine On
> RewriteRule ^$ index.html [QSA]
> RewriteRule ^([^.]+)$ $1.html [QSA]
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
> ErrorDocument 500 "<h2>Application error</h2>Railsapplication failed
> to start properly"
>
> The vhost .conf for the site looks like:
>
> <VirtualHost *:80>
> DocumentRoot "/var/www/webroot/rails-test/public"
> ServerName rails-test
> <Directory "/var/www/webroot/rails-test/public">
> Options ExecCGI FollowSymLinks
> AllowOverride all
> Order allow,deny
> Allow from all
> </Directory>
> </VirtualHost>
>
> Is the problem that the .rb file that the link points to is in a
> directory that doesnt have +ExecCGI set? What must I do to fix this?
> Am quite stuck.
>
> I guess one solution is to get mod_ruby working right? But I cant
> figure out how to check if it is working already, or find a set of
> instructions how to install it.
>
> Help greatly appreciated, thanks.

Bump

John Joyce

10/22/2007 11:49:00 PM

0


On Oct 22, 2007, at 12:05 PM, nobrow wrote:

> On Oct 13, 11:07 am, nobrow <nob...@gmail.com> wrote:
>> I am trying to get Ruby running on Apache. I may or may not have a
>> problem. What do you think?
>>
>> I have a test site called ruby-test set up with a vhost. When I go to
>> rails-test/ I see the "Welcome Aboard" page. But when I click the
>> "About your application's environment" link the script doesnt get
>> interpreted ... I just see it as text. I havent gone any further than
>> this, as I have been trying to get that script to run.
>>
>> rails-test/public/.htaccess looks like:
>>
>> AddHandler fcgid-script .fcgi
>> Options +FollowSymLinks+ExecCGI
>> RewriteEngine On
>> RewriteRule ^$ index.html [QSA]
>> RewriteRule ^([^.]+)$ $1.html [QSA]
>> RewriteCond %{REQUEST_FILENAME} !-f
>> RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
>> ErrorDocument 500 "<h2>Application error</h2>Railsapplication failed
>> to start properly"
>>
>> The vhost .conf for the site looks like:
>>
>> <VirtualHost *:80>
>> DocumentRoot "/var/www/webroot/rails-test/public"
>> ServerName rails-test
>> <Directory "/var/www/webroot/rails-test/public">
>> Options ExecCGI FollowSymLinks
>> AllowOverride all
>> Order allow,deny
>> Allow from all
>> </Directory>
>> </VirtualHost>
>>
>> Is the problem that the .rb file that the link points to is in a
>> directory that doesnt have +ExecCGI set? What must I do to fix this?
>> Am quite stuck.
>>
>> I guess one solution is to get mod_ruby working right? But I cant
>> figure out how to check if it is working already, or find a set of
>> instructions how to install it.
>>
>> Help greatly appreciated, thanks.
>
> Bump
>
>
Rails Talk will be your best source of an answer for this.


James Britt

10/23/2007 12:13:00 AM

0

nobrow wrote:
> I am trying to get Ruby running on Apache. I may or may not have a
> problem. What do you think?
>
> I have a test site called ruby-test set up with a vhost. When I go to
> rails-test/ I see the "Welcome Aboard" page. But when I click the
> "About your application's environment" link the script doesnt get
> interpreted ... I just see it as text. I havent gone any further than
> this, as I have been trying to get that script to run.

You also may have to tell apache that files ending in .rb are to be
handled via cgi. Otherwise, it really is just text.


AddHandler cgi-script .rb


Check the archives for threads on Ruby + CGI


--
James Britt

"The greatest obstacle to discovery is not ignorance, but the illusion
of knowledge."
- D. Boorstin

Alex

4/10/2011 2:22:00 AM

0

On Apr 9, 3:58 pm, NotMyProblem <notmyproble...@hotmail.com> wrote:
> We pay higher premium to the PAP by million $ to keep them from corruption.
>
> We pay insurance in CPF, but no one knows when can take it back.
>
> We pay premium to ensure employments, but all taken away by FTs.
>
> We pay premium so that our children can go to local Uni, but it is used
> to sponsor foreign students. Our children have to go overseas.
>
> We pay insurance so as to ensure cheaper hospital's bill, but end up
> having to go the Malaysia's hospitals. We might end up retiring in Batam
> old folks homes. Only PAP minister can get $8 hospital bill.
>
> We just keep paying and paying, a never ending premium. Only get back
> some peanut during election year. PAP keeps the rest.
>
> Opposition could ensure "we get what we paid for".
>
> On 09/04/2011 11:23, asdf asdf wrote:
>
>
>
>
>
>
>
> > On Apr 8, 10:10 pm, "truth"<tr...@universe.com>  wrote:
> >> Yes this asshole who looks like a cock is talking rubbish.
> >> Voting Oppositions as an Insurance Policy does not cost Singaporeans
> >> anything. The premium is ZERO - nothing. Singaporeans get the insurance
> >> benefits for FREE.
> >> OPPOSITION INSURANCE FOR FREE.
>
> > trying some clever persuasion, but no one buys it.

Even with 40 opposition MPs in parliament, PAP is the ruler.
So they cannot rule with 47 PAP members ?

Talent can be used in many areas.
Why must talent be MPs or ministers ?

Most of the talent they consider to be ministers are doing NS for the
country.
PAP just pluck them from civil services or army etc.

They have no interest in politics.