LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > Trying to get a test app going

Reply
 
Thread Tools Display Modes
  #1  
Old 10-15-2008, 11:40 AM
ffeingol ffeingol is offline
Senior Member
 
Join Date: Jul 2007
Location: /dev/null
Posts: 290
Default Trying to get a test app going

Hello all,

We're trying to play with our first RoR app on a cPanel server. Sorry, the doc's are not clear so I have a bunch of questions. We're setup for RoR shared hosting enviroment:

A) Does the .ls_rails_config go in the users home directory or under public_html?

B) Where do you actually put the rails app, under the users home dir or public_html?

I seem to remember (form somewhere) that you have to remove the public_html and then simlink public_html to the application.

TIA,

Frank
Reply With Quote
  #2  
Old 10-15-2008, 11:57 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
.ls_rails_config should to in the users home directory.

You can put the application anywhere under user's home directory. so, if you want to put it under public_html, just use configuration like
Code:
RailsApp myApp1 "/public_html/myapp1" "development" 4 1
RailsAppMap myApp1 "mydomain.com" "/"
Even when you do not put the application under public_html, there is no need to create symbolic link, litespeed will add a "Alias" from "myapp1/public/" to the URL specified.
Reply With Quote
  #3  
Old 10-15-2008, 02:48 PM
ffeingol ffeingol is offline
Senior Member
 
Join Date: Jul 2007
Location: /dev/null
Posts: 290
ok, we got that working (just some wrong paths in the .ls_rails_cnfig). Now the site owner is saying this:

"main "/" isnt spawning the ruby process and displaying a blank page rather then calling the default route".

Any help on that one?
Reply With Quote
  #4  
Old 10-15-2008, 03:15 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
If that server is not too busy, you can try turning on LSWS debug logging. make sure that "Ruby path" pointing to correct ruby installation.
Reply With Quote
  #5  
Old 10-16-2008, 06:32 AM
burmjohn burmjohn is offline
New Member
 
Join Date: Oct 2008
Posts: 2
Just to clarify, we got it working last night.

The only thing that wasn't working was the domain.com/ - but that seems to be an .htaccess issue. ( I posted what I added below to get it working)

Can you confirm what the .htaccess should be in the rails app's public directory?


Code:
RewriteEngine On

RewriteRule ^$ index.html [QSA]
Also it seems some processes seem to be lightening fast, then the next time I hit refresh it takes up to 20 seconds to render. (same page)

Thanks
- John
Reply With Quote
  #6  
Old 10-16-2008, 08:32 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
yes, put .htaccess file under public directory.

Some time is slow because the ruby process has terminated, so the rails framework will be reinitialized from scratch. It is slow. You can tune it with environment variables

http://www.litespeedtech.com/ruby-lsapi-module.html
Reply With Quote
  #7  
Old 10-16-2008, 08:36 AM
burmjohn burmjohn is offline
New Member
 
Join Date: Oct 2008
Posts: 2
Is the .htaccess I posted above sufficient / correct for LS?

Thanks
- John
Reply With Quote
  #8  
Old 10-16-2008, 08:48 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Yes, that's correct.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT -7. The time now is 05:50 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.