When trying to deploy my rails app through code deploy I get the following error message:
No such file or directory - /opt/codedeploy-agent/deployment-root/b3ff73b4-aa93-4e49-99e4-c26cdcf7a6f0/d-06LE313R9/deployment-archive/appspec.yml
on a "BeforeInstall" error.
I have appspec.yml in my rails app root directory (e.g it is myapp/appspec.yml), and have no idea how to put the appspec file into the deployment-archive directory.
The
appspec.yml
file should be at the root of the archive you upload to S3 or the GitHub repo you are deploying with. Try moving your appspec up one directory.Note that the appspec mostly uses paths relative to the archive root, so you might have to adjust them if you move your appspec.
Alternatively, you can create your bundle from inside your
myapp
directory so that theappspec.yml
is still in the root directory of your archive.