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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > can't get rails app to run with lsapi

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-06-2006, 05:36 AM
Shelby Shelby is offline
Member
 
Join Date: Aug 2006
Location: Dallas, TX
Posts: 22
Default can't get rails app to run with lsapi

Hello. I am trying to get a rails app to run with lsapi as described in the litespeed wiki:
http://litespeedtech.com/community/w...iki:ruby_rails

When I try to run the app, I continually get a 503 Service Unavailable error.

Below I have listed everything I did in the install, and my configuration, as well as the errors from the log. I tried to follow the instructions precisely, but I cannot make it work. Can anyone help?

Thanks, Shelby
_________________________________________________

I am running Litespeed 2.1.18 std on Linux. It serves static pages fine.
I installed mysql, created the database, and set database.yaml in the rails app with the correct user name and password. I can use rake migrate successfully to create the tables, so I know that the database connection works.

I have installed ruby and rails. I have installed litespeed ruby lsapi via
gem install ruby-lsapi. I copied the dispatch.lsapi into my rails public directory and made it executable. All the files in the rails app are readable by the server. In order to try and keep it simple, I am setting it up to run only one rails app for this virtual host.

I created a virtual host just for this web app. its config:
virtual host root: /absolute/path/to/railsapp/ (note - directory above public)
config file: /absolute/path/to/railsapp/config.xml
enable script: yes
restrained: no
GENERAL TAB
document root: /absolute/path/to/railsapp/public/
enable gzip: yes
customized error pages: 404 not found -- /dispatch.lsapi
EXTERNAL APPS
I created a lsapi app...
name: RubyRailsLSAPI
address: uds://tmp/lshttpd/rubyrailslsapi.sock
max connections: 10
environment:RAILS_ENV=production
LSAPI_CHILDREN=10
initial request timeout: 5
retry timeout: 5
persistent connection: yes
response buffering: no
command: /absolute/path/to/railsapp/public/dispatch.lsapi
CONTEXT
I created a LiteSpeedAPI context
URI: /dispatch.lsapi
LSAPI App: [VHostLevel] RubyRailsLSAPI

other than these settings, I left everything else blank.
I saved everything and restarted the server. I try to access the railsapp like this:
http://test.virtualhostname.org/login/login
and receive a 503 service unavailable error
Here is what my log shows:

2006-08-05 23:59:57.674 INFO [192.168.0.101:57801-0#mta_pmta] File not found [/absolute/path/to/railsapp/public/login/login]
2006-08-05 23:59:57.675 INFO [uds://tmp/lshttpd/rubyrailslsapi.sock] Connection refused, restart!
2006-08-05 23:59:57.676 INFO [uds://tmp/lshttpd/rubyrailslsapi.sock] Connection refused, restart!
2006-08-05 23:59:57.676 INFO [uds://tmp/lshttpd/rubyrailslsapi.sock] Connection refused, restart!

It seems to be looking for an actual file at the URL, rather than executing the rails application at that controller and method.

Note that this webapp does run fine on my development machine under webrick with the url:
http://127.0.0.1/login/login
Reply With Quote
 

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setup for Rails via Litespeed Ruby LSAPI Justin Ruby/Rails 2 12-08-2007 07:19 PM
rails lsapi wiki clarification dr_seus Ruby/Rails 3 07-11-2007 03:45 PM
Rails, LSAPI, Rewrites, Contexts, Authentication mabonyi Install/Configuration 2 02-11-2007 06:10 PM
Standard 2.2.5 + LSAPI + Rails uses up all processes dirkbj Bug Reports 7 12-01-2006 08:52 AM
Rails on LSAPI, db connection dropping.. marko Bug Reports 3 09-08-2006 01:23 PM


All times are GMT -7. The time now is 09:45 AM.



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