Koozali.org: home of the SME Server

Ruby on Rails in an I-Bay

Offline wicketman

  • 3
  • +0/-0
Ruby on Rails in an I-Bay
« 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

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Ruby on Rails in an I-Bay
« Reply #1 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
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline wicketman

  • 3
  • +0/-0
Re: Ruby on Rails in an I-Bay
« Reply #2 on: December 21, 2011, 12:52:53 PM »
Thanks for the informative answer, will try it out today !

Offline wicketman

  • 3
  • +0/-0
Re: Ruby on Rails in an I-Bay
« Reply #3 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 !


Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Ruby on Rails in an I-Bay
« Reply #4 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?
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)