Executing shell commands on Heroku

11 views
Skip to first unread message

Chris McCann

unread,
Nov 21, 2014, 6:17:43 PM11/21/14
to sdr...@googlegroups.com
That app that I just deployed to Heroku (thanks to Rob's help!) uses an executable in the applications /lib directory to do some very necessary stuff.

In development this works just fine by shelling out via backticks, like:  `dostuff param1 param2`

This doesn't appear to be working on Heroku and I'm trying to dig into it.  Has anyone here done something similar?

Cheers,

Chris

Rob Kaufman

unread,
Nov 21, 2014, 6:20:26 PM11/21/14
to sdr...@googlegroups.com, sdr...@googlegroups.com
Sure, you have to make sure that the lib directory is in your PATH (or relative referenced) and that they are properly committed to the repo as executable (chmod +x ). The easiest way to check on those things is to log in to the heroku shell (heroku run bash) and see what happens if you execute them manually.

Rob


Sent from Mailbox


--
--
SD Ruby mailing list
sdr...@googlegroups.com
http://groups.google.com/group/sdruby
---
You received this message because you are subscribed to the Google Groups "SD Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sdruby+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Miller

unread,
Nov 21, 2014, 6:20:44 PM11/21/14
to sdr...@googlegroups.com
Does `dostuff` provide the full path? `#{MyApplication::Application.config.root}/lib/dostuff ...`

On Fri, Nov 21, 2014 at 3:17 PM, Chris McCann <testf...@gmail.com> wrote:

--

Chris McCann

unread,
Nov 21, 2014, 6:33:44 PM11/21/14
to sdr...@googlegroups.com
Yes, the full path to the executable is provided.  Good suggestion to check that.  

After posting I went into bash on heroku and had a bit of a facepalm moment:  of course the executable I built for Mac OS X isn't going to run on Linux Ubuntu 14.04...disregard all!

Thanks,

Chris

You received this message because you are subscribed to a topic in the Google Groups "SD Ruby" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sdruby/q_HtX_cuh-U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sdruby+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages