Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: wicketman on December 20, 2011, 09:33:06 PM

Title: Ruby on Rails in an I-Bay
Post by: wicketman on December 20, 2011, 09:33:06 PM
Hello There,

I'm running SME 8.06.
I installed ruby on rails in console with the root account.

Is it possible to configure SME so that when you create an i-Bay and tick the option PHP & CGI to also include the interpretation of .rb for that bay ?

Regards,

Wicketman
Title: Re: Ruby on Rails in an I-Bay
Post by: cactus on December 21, 2011, 11:01:43 AM
You will have to add something like this to your webserver configuration file:

Code: [Select]
AddHandler cgi-script .rb
The proper way on SME Server to do so would be like this:

Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
cd /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/
echo AddHandler cgi-script .rb > 80AddHandler10rb
expand-template /etc/httpd/conf/httpd.conf
sv t httpd-e-smith
Title: Re: Ruby on Rails in an I-Bay
Post by: wicketman on December 21, 2011, 12:52:53 PM
Thanks for the informative answer, will try it out today !
Title: Re: Ruby on Rails in an I-Bay
Post by: wicketman on December 21, 2011, 03:55:45 PM
I'm afraid i'm missing something obvious but

When I try a simple ruby.rb file (puts 'hello ruby') in a dynamic content enabled iBay (with the above mentioned console commands executed prior to this) I get the following error :

Forbidden
You don't have permission to access /hangar/ruby.rb on this server.

I did chmod 755 ruby.rb but to no avail.

Any ideas ?

Thanks !

Title: Re: Ruby on Rails in an I-Bay
Post by: cactus on December 21, 2011, 04:00:34 PM
Forbidden
You don't have permission to access /hangar/ruby.rb on this server.
What happens when you put the ruby file in the html folder of the ibay? Does it work then?