Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(File.CopyError) could not copy from ...no such file or directory #31

Closed
SethArchambault opened this issue Jan 7, 2017 · 2 comments
Closed
Assignees
Labels

Comments

@SethArchambault
Copy link

I'm trying to deploy an app for the first time, and I've been following the instructions in the readme, but when I run sudo mix gatling.deploy hello_phoenix

I get this error:

==> Assembling release..
==> Building release hello_phoenix:0.0.1 using environment prod
==> Including ERTS 8.2 from /usr/lib/erlang/erts-8.2
==> Packaging release..
==> Release successfully built!
    You can run it in one of the following ways:
      Interactive: _build/prod/rel/hello_phoenix/bin/hello_phoenix console
      Foreground: _build/prod/rel/hello_phoenix/bin/hello_phoenix foreground
      Daemon: _build/prod/rel/hello_phoenix/bin/hello_phoenix start
** (File.CopyError) could not copy from "/home/seth/hello_phoenix/rel/hello_phoenix/releases/0.0.1/hello_phoenix.tar.gz" to "/home/seth/deployments/hello_phoenix/hello_phoenix.tar.gz": no such file or directory
    (elixir) lib/file.ex:524: File.cp!/3
    lib/gatling/tasks/deploy.ex:110: Mix.Tasks.Gatling.Deploy.copy_release_to_deploy/1
    lib/gatling/tasks/deploy.ex:201: Mix.Tasks.Gatling.Deploy.call/2
    lib/gatling/tasks/deploy.ex:35: Mix.Tasks.Gatling.Deploy.deploy/1
    (mix) lib/mix/task.ex:294: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2

Note, the file it's looking for exists in ~/hello_phoenix/_build/prod/rel/hello_phoenix/releases/0.0.1
but it's looking in ~/hello_phoenix/rel instead.

Any idea why? How do I fix this?

@colindensem
Copy link

colindensem commented Jan 9, 2017

Seth, I think this is a duplicate or very much related to #29. I also hit this today; although I'm using centos so figured it was me. There is also a comment in the tail of #4 about output dir.
I think I've got config blindness, so I'm going to wind it all back and try again. If I find a solution I'll let you know. ~ It's going to be simple I just know it.

So, I tried this, but maybe I didn't. In rel/config.exs add under your prod environment block
set output_dir: "rel/<project_name>"

This is passed to distillery and distillery build to rel and not _build. I'm sure I tried this... ymmv. Of course I hit a road block with update-rc milliseconds later...

dennisreimann added a commit that referenced this issue Jan 19, 2017
@dennisreimann dennisreimann self-assigned this Jan 19, 2017
@dennisreimann
Copy link
Contributor

We just released v1.1.0 which fixes this problem. See #29.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants