I'm using the tts gemfor spoken audio onscreen, and all works fine on local dev station, but throws 500 on heroku's server. The tts gem depends on mpg123.
The heroku logs send back the following errors at runtime:
2014-06-23T09:37:47.024478+00:00 app[web.1]: mpg123 executable NOT found. This function only work with POSIX systems.
2014-06-23T09:37:47.024485+00:00 app[web.1]: Install mpg123 with `brew install mpg123` or `apt-get install mpg123`
2014-06-23T09:37:47.025829+00:00 app[web.1]: Completed 500 Internal Server Error in 196ms
First attempt: heroku run brew install mpg123
Running `brew install mpg123` attached to terminal... up, run.1741
bash: brew: command not found
Second attempt: heroku run apt-get install mpg123
Running `apt-get install mpg123` attached to terminal... up, run.5879
W: Not using locking for read only lock file /var/lib/dpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.
Upon further research, I'm now understanding that a 'custom buildpack' needs implementation? If so, how would one determine which buildpack to use and how to install mpg123 using it? Unless there is an easier or more appropriate way, I'm certainly open to that as well.
Gleaning some clues from this post, I took a few stabs in the dark by adding the following buildbacks, then re-running the attempts above, but to no avail:
heroku plugins:install https://github.com/heroku/heroku-buildpacks
Installing heroku-buildpacks... done
heroku config:add BUILDPACK_URL=https://github.com/benjie/heroku-buildpack-apt
heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby
heroku config:add BUILDPACK_URL=https://github.com/atris/heroku-buildpack-C
For what it's worth, this is a rails 4 project running under heroku's cedar stack.
Thanks!