how to execute binary on heroku?

后端 未结 2 939
执笔经年
执笔经年 2021-01-07 11:45

I try to execute a binary on heroku. I follow this blog : http://www.verrot.fr/2010/02/24/executing-binary-files-with-ruby-on-rails-and-heroku/ :

I have the followi

相关标签:
2条回答
  • 2021-01-07 12:05

    Did you make sure the permissions on your local binary allow execution? Git is permissions-aware. If not, you need to make sure the file allows executable permissions (modify the permissions if you must), then add the modified file to git and repush to heroku before trying again. Keep in mind that the user heroku will use to execute the file may or may not be the owner, so you may need to play with them in order to get heroku to recognize it. Just chmod 777 bin/executable_name as a last resort.

    0 讨论(0)
  • 2021-01-07 12:11

    How I have gotten this to work, but be warned, Heroku does not support this solution. The direct quote from Heroku Support is "you are on your own."

    1. Create a bin directory in your application.
    2. Add Debian etch amd64 binaries to this directory. For example, add application called mongodump.
    3. Have your code execute system call. Example (note the lack of path):
    system "bin/mongodump --help"
    

    A true or false will be returned from the system call.

    0 讨论(0)
提交回复
热议问题