heroku-buildpack-elixir icon indicating copy to clipboard operation
heroku-buildpack-elixir copied to clipboard

Missing `_build/prod` compiled files when using the Procfile from the readme

Open lachezar opened this issue 12 years ago • 2 comments

Following the instructions for setting up heroku I received the following errors when deploying:

2013-11-24T02:00:23.761267+00:00 heroku[web.1]: Starting process with command `mix server -p 44348`
2013-11-24T02:00:25.472996+00:00 app[web.1]: ** (Mix) The task server could not be found
2013-11-24T02:00:26.671297+00:00 heroku[web.1]: Process exited with status 1
2013-11-24T02:00:26.682889+00:00 heroku[web.1]: State changed from starting to crashed

I tried investigating the problem and I found out that there is no _build/proc folder with compiled sources in the heroku instance.

To solve this I had to add the following in my Procfile web: yes | mix deps.get && mix server -p $PORT

I wonder is this some new change in heroku or have I done something wrong (I followed the instructions in the README.md, but still...). None the less changing the Procfile fixed the problem for me.

lachezar avatar Nov 24 '13 02:11 lachezar

Same issue...

jeregrine avatar Dec 09 '13 05:12 jeregrine

I have the same issue, albeit when using Dokku instead of Heroku. The solution of changing the Procfile works on Heroku, but not on Dokku. It may be related to this?

#!/bin/bash
export HOME=/app
for file in /app/.profile.d/*; do source $file; done
hash -r
cd /app
if [[ -f Procfile ]]; then
    ruby -e "require 'yaml';puts YAML.load_file('Procfile')['$1']" | bash
else
    ruby -e "require 'yaml';puts (YAML.load_file('.release')['default_process_types'] || {})['$1']" | bash
fi

Specifically, the cd /app before checking for the existence of Procfile. This seems to negate the effect of cding into the app subdirectory in one of the .profile.d/ scripts. What's the best way to work around this?

aidansteele avatar Jan 13 '14 00:01 aidansteele