Is it possible to execute a little binary file (required for payment processing) with Kernel#exec from a ruby app hosted on Heroku ? Or do I need to switch to another rails hosting solution ?
-
It would be faster to write a test case and figure it out yourself.Cory Petosky– Cory Petosky2010-01-15 01:09:20 +00:00Commented Jan 15, 2010 at 1:09
-
Suppose it could work, just try it... And post the answer of course for future reference!Veger– Veger2010-01-15 09:03:05 +00:00Commented Jan 15, 2010 at 9:03
-
things like exec('ruby -v') or exec('ls') work but when I'm trying exec(File.dirname(FILE))+'/myexec') I'm getting a 'permissin denied' error, is there something wrong here ? or maybe it's just the way Heroku's architecture work ?Gaetan Dubar– Gaetan Dubar2010-01-15 14:23:39 +00:00Commented Jan 15, 2010 at 14:23
Add a comment
|
1 Answer
Heroku does allow for the compilation of native gems from it's gem manifests so there is a distinct possibility that you will be able to package the binary up as a gem and get heroku to run it as such. Make sure you set the binary to be executable before you push it to heroku as git is permissions aware.
1 Comment
Gaetan Dubar
I've thought about that too, but Heroku support answered the question yesterday: only executables in the "/bin" subdirectory of the app can be executed