Victor Martin wrote:
> Hi there
> 
> I make a call jsut like this:
> 
> value = `./simulated_annealing`
> 
> Which is a C Object file, but Rails tells me it cannot find that file. I
> put it in the same dir that the rest of the models files (since it's
> called by one of those models), but I guess it should be in any other
> place.
> 
> What do I have to do?

Hi Victor,

 Best option is to use absolute path for running the program. For ex., 
you can create a directory "bin" under your rails application top level 
directory. Place your program under "bin" directory. Then you can 
execute the program something like -

 cmd = "#{RAILS_ROOT}/bin/cbin arg1 arg2"
 value = `#{cmd}`

Thanks
-- Prasad
http://roorky.com
Interactive Programming Books
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to