multiple rails apps on a single IP/top level domain

#2
Ahh...I think I fugured it out. You create a plain old vhost, go to the Context menu, then add a new context of type Rails. Right?
 
#4
Well that was pretty painless.

I have a permission problem now, or at least I think it is, and I'm not sure how to fix it.

I can access static content in the Rails public folder, but when I try to do something Rails specific I get an error. I took a peek in the rails dev log and I see "permission denied - /home/ubuntu/dev/myapp/config/../tmp/sessions//ruby_sess.1022f62520257af". Then a stack trace to a bunch of exceptions in rails actionpack, mostly to do with session objects.

If this is a permssion problem, I'm not sure who to give them to and what kind.

I'm pretty new to linux, all of my rails development has been done on Windows. I've got a lot done over the past few days, but so many new things are being thrown at me I get a little stuck sometimes. I did manage to get Ubuntu, Litespeed, MySQL, rails, ruby, a bunch of gems installed without any trouble. So far the learning curve has been alright.
 
#6
thanks. ya..it was time to bite the bullet and get a proper dev box running. I was using Cygwin but I found a lot of things I needed wouldn't compile.

Ok, I checked the folder ownership and both 'public' and 'tmp' have the same file owner, file group and permission set which is 'ubuntu'.

'ubuntu' is the default user for the Ubuntu image I installed yesterday.

Just to I don't leave anything important out...so what I did was install Ubuntu, got all the tools installed and test (mysql, ruby..so on). Then I went to the command line, made a directory called 'dev', in my home directory. Ran 'rails myapp', just for a small test. Told Literserver about it. Lite server will serve the raisl app, but rails throws that exception when I click "About your application's environment" on the default page.
 
#8
I have a feeling that I'm stuck int he web-brick mode of thinking and not production thinking.

To deploy my internal apps with Litespeed, I'm probably supposed to place a copy of the rails app into a folder on the Ubuntu box, then change ownwership of /public and /tmp to the same user that Litespeed uses (I left it nobody, probably not the best joice).

Am I on the right track?
 

mistwang

LiteSpeed Staff
#9
You can configure the vhost to run rails app in suEXEC mode, the user who own public/ folder, please check our wiki.

If it is not in suEXEC mode, change ownership to the user that lshttpd run as.

Just make the user that ruby run as can write to the temp folder.
 
#10
Sweet. It's working. That was pretty easy. Thanks for pointing me in the right direction.

Originally I read the wiky and I tried the suEXEC VH. It worked but I could only host one rails app per domain. I'm talking about setting up a new VH with EasyRailsWithSuSEXEC. Are you talking about someting else?
 
Top