![]() |
Will there be official support for Rails >= 2.3
My company is developing some new Rails (2.3) applications and deploying on litespeed.
I know there are currently incompatibilities, but was wondering if the new Rails versions will get the same kind of support that the old versions do. Being able to configure a rails app in just a few steps is a lot nicer than trying to work out how to get Rack and Litespeed to play nice. |
add to our to-do list.
|
I work with Tim and these are some of the errors that I've been running into.
This is the config for the external app for the vhost that the context is hooked to: Code:
Name railsCode:
Dir.chdir(File.join(File.dirname(__FILE__), '..'))Code:
no such file to load -- /opt/local/lib/ruby/gems/1.8/gems/rack-0.9.1/lib/rack/handler/lsws.rb (MissingSourceFile)Code:
irb(main):006:0> require 'lsapi' |
Quote:
Thanks for the info. |
Hi Mistwang,
Any update on getting lsws rails 2.3 complaint? I have a bunch of licenses purchased through you guys and plan on maybe even getting more with a large deployment of a new rails app, but if theirs no support on this we cannot use your product..... |
Have taken some time to investigate it tonight, I think a piece of code similar to
rails-2.3.0/lib/commands/server.rb should work, the main change is to use our Rack handler instead of Mongrel or WEBrick for the server object server = Rack::Handler::LSWS Might need some tweaks like our RailsRunner.rb Due our tight schedule and Ruby programming skills, if any experienced Ruby/Rails developer would to take this project, please contact us. we will pay your time. |
I'm willing to give it a shot, but I'm running into strange errors when trying to include the Rack:LSWS handler.
When trying to include it from IRB I get: Code:
irb(main):001:0> require 'rubygems' |
1 Attachment(s)
I think I got it. Just took some time to find the right combination of settings. I've attached the file that needs to be run. It uses the same setup you would use as a normal rack app with lsws. I'll post full details on the setup tomorrow.
|
Maybe it need updates on the LSAPI object definition. Make it derive from "File" object could make irb happy.
It is in ruby-lsapi/ext/lsapi/lsruby.c inside Init_lsapi() function. |
Quote:
Some code are not necessary, could clear it up a little bit. Only one concern, our RailsRunner.rb takes care of the DB connection problem caused by fork(), so it close DB connection then reopen it after fork(). The default Rack::Handler::LSWS does not have this logic, so it may not work properly. I am thinking about a dedicate Rack handler for Rails, maybe call it Rack::Handler::LSRAILS, it should be similar to Rack::Handler::LSWS, just add logic like the what we have in RailsRunner.rb . All the code could be in one file. |
| All times are GMT -7. The time now is 09:27 AM. |