netflakes
Mix.Project missing in Elixir/Phoenix prod release
Am having an issue with Mix.Project being missing in an Elixir/Phoenix prod release - it is needed for a multitenant migration - and is called in Ecto… Any ideas why this would be missing in a release??
What am doing wrong - am using Edeliver/distillery to do the release/deploy
Thanks
Error on the remote_console on the prod instance
iex(present_me@127.0.0.1)5> Apartmentex.new_tenant(Repo, foo.id)
** (UndefinedFunctionError) function Mix.Project.deps_paths/0 is undefined (module Mix.Project is not available)
Mix.Project.deps_paths()
(ecto) lib/mix/ecto.ex:172: Mix.Ecto.source_repo_priv/1
Most Liked
NobbZ
Mix is not available in production on purpose. It is a build tool and not meant to give you information during runtime of your project.
If you really have to, you can include :mix in :extra_dependencies, but it will probably not work as you expect when you are in a distillery release, so I think it is best to find another way to implement the feature you need not using or relying on mix.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








