Hi, I tried to transfer my project from Mac to Linux, but have trouble to use fiddle to call the dynamic library which I generated using same Fortran and C codes I used in Mac. I used same version of Ruby both in Mac and Linux. To na...lxh37 (Liz Huang)
I could call library libSamplesize.dylib successfully in console application and ruby script (not in thread). We have created a test project to test this part of codes thoroughly before we generated the library, actually this par...lxh37 (Liz Huang)
"libSamplesize.dylib" is external library I genereated from C codes. Hope you read the thread before you post answer, I have written console application, ruby script to test C code and it works properly, it only crashes in Ruby On Rail...lxh37 (Liz Huang)
When I wrap my code by thread, it has trouble to finish. I only see the output of "Started At ....", never get to see "End at ...". ~~~ruby require 'fiddle/import' module Libm extend Fiddle::Importer dlload '/Lib...lxh37 (Liz Huang)
Thanks for trying to help. Thread is new to me, I understand "Wrapping your code into Thread.new do your_code end.join" after read documentation about thread, but not sure what do you mean by "wrap it in a loop again"?lxh37 (Liz Huang)
BTW, errmsg was set to a string with 70 empty spaces in both places, when I paste it in my previous post, it doesn't look well, so I edited it. lxh37 (Liz Huang)
I used fiddle in my Ruby script and it works! but when I use it in the same way on Ruby On Rails, it crashed. I pasted the codes below and you can see the codes are exactly the same. I am not sure if it is fiddle. Ruby script whi...lxh37 (Liz Huang)