Closed dennisreimann closed 7 years ago
This looks great. Thanks! ❤️ 💚 💙 💛 💜
Excellent work documenting this @dennisreimann. I was following the steps but stumbled on the last one. sudo mix gatling.deploy
keeps getting this error:
** (FunctionClauseError) no function clause matching in Mix.Tasks.Gatling.Deploy.run/1
lib/gatling/tasks/deploy.ex:19: Mix.Tasks.Gatling.Deploy.run([])
(mix) lib/mix/task.ex:294: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2
(elixir) lib/code.ex:370: Code.require_file/2
Any idea what is the problem? Thanks.
@1zaak sorry, I forget the project name as an argument in my article. The README here has it correct – sudo mix gatling.deploy myapp
.
Ah, thanks @dennisreimann. But now i'm getting this error after running sudo --preserve-env mix gatling.deploy msqhportal
:
Cannot add file sys.config to tar file - [{error,{13,erl_parse,["syntax error before: ",["Fun"]]}}]
==> Problem generating release tarball:
{:tar_generation_error, :unknown}
** (File.CopyError) could not copy from "/home/izaak/msqhportal/rel/msqhportal/releases/0.2.0/msqhportal.tar.gz" to "/home/izaak/deployments/msqhportal/msqhportal.tar.gz": no such file or directory
I didn't put all the steps I did up to this point because my guess is this is a fairly known issue, but I could be wrong. Anyway, any ideas?
I haven't come across this and it looks like there is a problem creating the release. Does it work locally? And does the same error come up when you run the commands manually on the production machine?
mix release.init
mix release --warnings-as-errors --env=prod
Yup both local and production is throwing this error:
Cannot add file sys.config to tar file - [{error,{13,erl_parse,["syntax error before: ",["Fun"]]}}]
==> Problem generating release tarball:
{:tar_generation_error, :unknown}
Then I think this isn't Gatling related and might be an app specific problem. Did you run through all of the necessary Distillery setup steps?
The first examples include the import, the latter two don't. I also made the examples a bit clearer and moved asset compiling to the before
mix phoenix.digest
hook.