ruby lsapi removes RAILS_ROOT value from ENV
after include lsapi it removes RAILS_ROOT varible from ENV why?
also why include lsapi chdir to rails_root? rails_runner do this!
(i think it is bad design that include makes something like that)
/* Do not need those environments after initialization */
remove_env = rb_str_new( "RAILS_ROOT", 10 );
rb_funcall( env_copy, rb_intern( "delete" ), 1, remove_env );
Also why include lsapi change default stdout? Why it don't to that after calling some start metod like LSAPI.accept or something similar.
Both are done for efficiency, it requires to copy the environment variables for each request, so we want to keep number of environment variables as small as possible.
For the default stdout, maybe it is not necessary, we receive some requests to redirect it. If we can do it once during initialization, will avoid doing it for each request.
Both are minor details, so there should not be a problem do it one way or the other.
We also thinking to redirect rails exceptions from our stderr.log to the application log, but have no clue how to do it.
By the way i wrote Rails3 runner: http://github.com/madmax/lsws-rails3-runner
|All times are GMT -7. The time now is 07:46 PM.|