Koozali.org: home of the SME Server

Hosting Ruby on Rails on SME

petrov

Hosting Ruby on Rails on SME
« on: November 17, 2005, 10:40:34 PM »
Has anyone tried hosting a Ruby on Rails site on the SME Server?

I've looked on Google, but could not find anything relevant.

Thanks.

Offline Jawor

  • *
  • 14
  • +0/-0
Hosting Ruby on Rails on SME
« Reply #1 on: November 25, 2005, 01:11:47 AM »
I'm really into to get it up and running on sme 6.0.1

Will need fastcgi first

http://distro.ibiblio.org/pub/linux/distributions/e-smith/contrib/RichLafferty/rt/fastcgi/mod_fastcgi-2.2.12-1rt.i386.rpm

hope this one will do

but it's long week ahead to setup this wicked framework on sme

He who dares I say

Offline chrislaurie

  • *
  • 96
  • +0/-0
Hosting Ruby on Rails on SME
« Reply #2 on: January 02, 2006, 09:05:00 AM »
OK - I'm starting with this. I'll post my progress and queries here so that this may become the basis of a proper HowTo.

My objective is to have Ruby on Rails running on v6.0.1

I installed the above rpm but now I'm worried about the correct version. The lastest version of mod_fastCGI is 2.4.0 and the above version  is 2.2.12. I'm not experianced enough to build this myself. Anybody else want to give it a shot?

Current problem is this: The install instruction on the RubyOnRails wiki lets me create a new directory and set owners and permissions as follows:
$ mkdir /tmp/fcgi_ipc
$ chown apache.apache /tmp/fcgi_ipc -R
$ chmod 755 /tmp/fcgi_ipc -R

BUT when I restart the httpd service it fails and says that it cannot get write access to the directory. If I chmod 777 then the service starts, but that is dangerous?

Any suggestions?

Offline chrislaurie

  • *
  • 96
  • +0/-0
Hosting Ruby on Rails on SME
« Reply #3 on: January 02, 2006, 11:37:14 AM »
I don't know if this is good or bad news but the Ruby on Rails make & install went without a hitch. I had to download and install a number of the development tools rpms but after that I downloaded all the sources and did the configure, make & make install thing without any error reports. So far so good.

I loaded up an app that runs with instant rails on my laptop and changed all the path settings.

When I fire up the app I get various erors about files not found. It seems to me that rails is running as one of the errors refers to dispatch.fcgi.

My question: I implemented my ruby app using the /opt directory with an httpd alias (like phpmyadmin and the Mantis system I use). The rails docs wants me to create a virtual host. Can it work as an alias?

I suspect my problem stems from a combination of permissions and how SME works with Apache. Is there anybody that has used Ruby on Rails on SME 6.0.1? Any pointers or ideas anyone?

Offline chrislaurie

  • *
  • 96
  • +0/-0
Hosting Ruby on Rails on SME
« Reply #4 on: January 02, 2006, 12:17:18 PM »
A quick look at the apache log indicated that the files are sought under the main document root (i.e. /home/e-smith/files/ibays/primary/html/)

When I move my app there and then try to access it I get an error 403 - Access forbidden. In a desparate attempt to make it work I chmod to 777 but that has no effect. I suspect it has something to do with .htaccess

Ruby on rails uses the .htaccess system for some fancy rerouting work. Will this cause a conflict in SME?

Janm

Hosting Ruby on Rails on SME
« Reply #5 on: January 02, 2006, 03:51:52 PM »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Hosting Ruby on Rails on SME
« Reply #6 on: January 02, 2006, 06:14:06 PM »
Quote from: "chrislaurie"

$ chown apache.apache /tmp/fcgi_ipc -R
...
Any suggestions?


chown www.www /tmp/fcgi_ipc

Offline chrislaurie

  • *
  • 96
  • +0/-0
Hosting Ruby on Rails on SME
« Reply #7 on: January 03, 2006, 07:24:59 AM »
Thanx for the responses - I'll respond with results when I've got a little further.

I'm trying to build the mod_fastcgi myself as a DSO. The Install file says to make the DSO using this command:

apxs -o mod_fastcgi.so -c *.c

However this fails with the response:

bash: apxs: command not found

Any suggestions?

plog99

Ruby on Rails
« Reply #8 on: January 07, 2006, 03:33:42 PM »
I tried Ror on SME7 Beta 9

you can see a little Howto here:
http://forums.contribs.org/index.php?topic=30166.0