rinruby icon indicating copy to clipboard operation
rinruby copied to clipboard

Error generated by method quit in rails app

Open rami85 opened this issue 12 years ago • 3 comments

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...

rami85 avatar Oct 09 '12 15:10 rami85

Having the same issue using Sinatra instead of Rails. Any tips, @clbustos?

dometto avatar Feb 13 '21 19:02 dometto

It looks like fixes to this repo meant to solve this problem have never been released on rubygems. I understand if the maintainers have little time for this repo anymore, but cutting a new gem release would be very much appreciated, @clbustos or anyone else!

dometto avatar Feb 13 '21 20:02 dometto

cc @fenrir-naru

dometto avatar Feb 14 '21 10:02 dometto