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

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > Ruby on Rails: Wiki install Tutorial

Reply
 
Thread Tools Display Modes
  #1  
Old 07-07-2006, 12:33 PM
clung clung is offline
New Member
 
Join Date: Jun 2006
Posts: 2
Default Ruby on Rails: Wiki install Tutorial

Does anyone know when the Wiki walkthrough of getting RoR working with Litespeed is going to be completed?

http://www.litespeedtech.com/communi...iki:ruby_rails

In particular, the LSAPI or Mongrel sections.

Thanks
Reply With Quote
  #2  
Old 07-07-2006, 05:26 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
clung,

The Ruby on Rails LSAPI setup how-to has been completed.

http://www.litespeedtech.com/communi...iki:ruby_rails

Check it out. =)

You can also view the same configuration used for our ruby demo via the admin console at http://www.litespeedtech.com/products/demo/
Reply With Quote
  #3  
Old 07-12-2006, 10:11 AM
jmillr jmillr is offline
New Member
 
Join Date: Jul 2006
Posts: 1
Default multiple instances?

Thanks for posting these instructions. However, it isn't clear how to map different rails apps to different urls. For example:

server.host.com/typo serves 127.0.0.1:4000
server.host.com/tracks serves 127.0.0.1:4001

(Well, the instructions don't say anything about different port numbers. I'm coming from a Mongrel context. Also, the directions there mention Mongrel under Requirements:

If you want to use mongrel as the backend, it should have been installed and working properly on its own.

but then don't mention Mongrel again. How does Mongrel fit into the instructions that follow the Requirements? But the basic question remains: )

The instructions posted seem to allow only one app which is mapped to the root of the server. How can I instantiate several different apps located in different directories and publicly differentiate them by url rather than by port number?

Thanks for your help.

John Miller

Last edited by jmillr; 07-12-2006 at 11:02 AM..
Reply With Quote
  #4  
Old 07-12-2006, 11:37 AM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
When using Mongrel with LiteSpeed, just think of Mongrel as a http proxy server. So create "proxy" external apps, and create "contexts" to map url to the correct "proxy"/mongrel backend.

There is a litespeed how-to on mongrel's website:

http://mongrel.rubyforge.org/docs/litespeed.html

Two things to note:

1) In the above how-to, initial request timeout is way too low. 1 second is not practical. 15-30 seconds is more like it unless you entire db is ram based.

2) Understand that Mongrel is a http server and much slower http server than litespeed. With this in mind, you do not want Mongrel to handle static images/css/etc. Create a static context in lsws with higher priority (lower number) context in lsws to point to the static files/folders so that LiteSpeed handle all static content while only dynamic rail requests is routed to Mongrel backend.

We will update our wiki for sure.
Reply With Quote
  #5  
Old 07-12-2006, 12:25 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
To mount a Rails application at a URL other than the document root, using /typo/ as an example, you need to define a static context /typo/ pointing to <railapp>/public/ folder, define a LSAPI context with URI /typo/dispatch.lsapi, instead of using it as a 404 handler, you have to add context level rewrite rules, you can just copy those rules in the .htaccess under public folder of that application, replace "dispatch.rb" or "dispatch.fcgi" with "dispatch.lsapi".

Also, you need to change the route configuration for the Rails application to fix the "unknow route" error if any.
Reply With Quote
  #6  
Old 07-12-2006, 04:42 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
John,

We have thoroughly revamped our Ruby wiki:

a) updated the current ruby lsapi how-to with single/multiple rail app installation within a single vhost.

b) added a new how-to page geared toward Mongrel users.

http://www.litespeedtech.com/community/wiki/

Enjoy!
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

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
Ruby Rails tuning - traffic bursts gwhite Ruby/Rails 6 03-26-2007 02:23 PM
Ruby On Rails 503 Service Unavailable Bug mroberto Ruby/Rails 6 03-24-2007 07:06 PM
Expected memory usage? subBlue Install/Configuration 4 10-20-2006 02:39 PM


All times are GMT -7. The time now is 12:50 AM.



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