Justin
04-28-2006, 11:35 AM
While there is fairly good documentation of the process for running Rails on Litespeed via FastCGI, I'm having trouble finding a step-by-step description of the configuration process for deploying Rails apps via the Litespeed Ruby LSAPI.
Steps done so far:
$ cd ruby-lsapi-1.0
$ ruby setup.rb config
$ ruby setup.rb setup
$ sudo ruby setup.rb install
- Copy dispatch.lsapi to Rails app's public/ directory
- Change shebang line to reference /opt/local/bin/ruby
- Change rewrite rule in public/.htaccess as described in Ruby LSAPI README
- Add same rewrite rule in Litespeed admin console (just in case)
- Server Configuration > External Apps > Add, Type: LSAPI APP
I tried to configure the many LSAPI app options, but aside from adding an extra environment variable LSAPI_CHILDREN=n to match the "Max Conns" value, it's not clear to me what the other option values should be set to. When I restart Litespeed and test the Rails app in the browser, a dialog appears to download dispatch.lsapi as a binary file.
I'm sure I'm missing something relatively simple, but with no documentation of the process to go by, I'm flummoxed. As mentioned above, a detailed, step-by-step walkthrough for creating a new Rails virtual host in Litespeed and getting it working via the Ruby LSAPI would be most greatly appreciated. I'm happy to volunteer myself as the lab rat! ;)
With sincere gratitude,
Justin
Steps done so far:
$ cd ruby-lsapi-1.0
$ ruby setup.rb config
$ ruby setup.rb setup
$ sudo ruby setup.rb install
- Copy dispatch.lsapi to Rails app's public/ directory
- Change shebang line to reference /opt/local/bin/ruby
- Change rewrite rule in public/.htaccess as described in Ruby LSAPI README
- Add same rewrite rule in Litespeed admin console (just in case)
- Server Configuration > External Apps > Add, Type: LSAPI APP
I tried to configure the many LSAPI app options, but aside from adding an extra environment variable LSAPI_CHILDREN=n to match the "Max Conns" value, it's not clear to me what the other option values should be set to. When I restart Litespeed and test the Rails app in the browser, a dialog appears to download dispatch.lsapi as a binary file.
I'm sure I'm missing something relatively simple, but with no documentation of the process to go by, I'm flummoxed. As mentioned above, a detailed, step-by-step walkthrough for creating a new Rails virtual host in Litespeed and getting it working via the Ruby LSAPI would be most greatly appreciated. I'm happy to volunteer myself as the lab rat! ;)
With sincere gratitude,
Justin