-
Notifications
You must be signed in to change notification settings - Fork 39
Description
in a controller's method, I have this (like a script in ruby):
@r = RinRuby.new(true,false)
@r.assign "name", name
begin
@r.eval "source("public/rscripts/e2_p1m1_Binaria_NN.R")"
@tatt = @r.pull "tatt"
rescue Exception => e
LOGGER.debug "#{e.class}: #{e.message}"
end
@r.quit # free R
note:the script in R is obviously correct and it returns some variables and a barplot.
My problem is the @r.quit.
If I don't close conection between Ruby an R, I have a process called Rterm.exe, that seems never finish and is imposible open the pdf with the barplot. (In client,however, the html shows the numeric variables correctly).
If I close the conection with the method @r.quit. the process Rterm.exe seems finish correctly but my server throws a exception "Errno::ECONNRESET" and on screen appears a message like "We're sorry, but something went wrong."
I don't know if the method "quit" close another conection or thread and this is the reason of my problem...