首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装guardian后,elixr guardian中的mix deps.get错误

安装guardian后,elixr guardian中的mix deps.get错误
EN

Stack Overflow用户
提问于 2017-08-03 20:55:53
回答 1查看 325关注 0票数 1

我按照一个教程安装了卫报,使用的是{:卫报,"~> 0.14"}。运行mix deps.get时,会出现以下错误:

代码语言:javascript
复制
** (Mix.Config.LoadError) could not load config config/dev.exs
** (CompileError) config/dev.exs:1: undefined function mix/1
(elixir) lib/code.ex:176: Code.eval_string/3
(mix) lib/mix/config.ex:180: Mix.Config.read!/2
(mix) lib/mix/config.ex:217: anonymous fn/3 in Mix.Config.read_wildcard!/2

这是我的config/dev.exs文件。我试着为卫报生成一个密钥,但它给出了一个合理的问题。

代码语言:javascript
复制
mix phoenix.gen.secretuse Mix.Config

config :sling, Sling.Endpoint,
  http: [port: 4000],
  debug_errors: true,
  code_reloader: true,
  check_origin: false,
  watchers: []

# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n"

# Set a higher stacktrace during development. Avoid configuring such
# in production as building large stacktraces may be expensive.
config :phoenix, :stacktrace_depth, 20

# Configure your database
config :sling, Sling.Repo,
  adapter: Ecto.Adapters.Postgres,
  username: "postgres",
  password: "postgres",
  database: "sling_dev",
  hostname: "localhost",
  pool_size: 10

# Configure Guardian
  config :guardian, Guardian


  import_config "dev.secret.exs"
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-08-04 03:58:48

从第1行中删除mix phoenix.gen.secret,以便成为use Mix.Config

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45484869

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档