Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby + Apache, scripts not being interpreted

Reply
Thread Tools

Ruby + Apache, scripts not being interpreted

 
 
nobrow
Guest
Posts: n/a
 
      10-13-2007
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.

 
Reply With Quote
 
 
 
 
nobrow
Guest
Posts: n/a
 
      10-22-2007
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

 
Reply With Quote
 
 
 
 
John Joyce
Guest
Posts: n/a
 
      10-22-2007

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.


 
Reply With Quote
 
James Britt
Guest
Posts: n/a
 
      10-23-2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: .aspx pages not being interpreted Steve C. Orr [MCSD, MVP, CSM, ASP Insider] ASP .Net 0 07-02-2008 04:53 AM
Ruby has to be interpreted line by line in runtime, does this affectRuby's execution efficiency badly? Erwin Moller Ruby 7 05-08-2008 03:09 PM
In order to cross platform, Ruby is designed to be interpreted inruntime, so Ruby code is exposed on the server. This brings a security dangerwhich is not acceptable. Erwin Moller Ruby 9 05-08-2008 01:07 PM
ruby -w and '(...) interpreted as grouped expression' Minkoo Seo Ruby 1 03-11-2006 08:23 AM
How to get html scripts to be interpreted via "print" Dan Whitaker HTML 7 12-01-2003 01:19 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57