3

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 ?

3
  • It would be faster to write a test case and figure it out yourself. Commented Jan 15, 2010 at 1:09
  • Suppose it could work, just try it... And post the answer of course for future reference! Commented 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 ? Commented Jan 15, 2010 at 14:23

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.