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)
maby this is problem:
/* 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.
also why include lsapi chdir to rails_root? rails_runner do this!
(i think it is bad design that include makes something like that)
Code:
require "rubygems"
ENV["RAILS_ROOT"] = "./"
puts "BEFORE: #{ENV["RAILS_ROOT"]}"
require "lsapi"
$stdout = IO::STDOUT
puts "AFTER: #{ENV["RAILS_ROOT"]}"
/* 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.
Last edited: