如何在mix.exs文件中指向本地灵丹妙药版本? [英] How do I point to a local elixir version in mix.exs file?

查看:63
本文介绍了如何在mix.exs文件中指向本地灵丹妙药版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我有一个凤凰项目正在用作各种测试应用程序.如果我想使用正在使用的本地版本的elixir源代码(并进行更改),如何告诉phoenix使用它?我还希望能够将其与"iex -S mix"一起使用.下面的elixir: ["~> 1.6.0-dev", path: '/my/local/path/to/elixir']不起作用,但这是我正在尝试做的事情.

So I have a phoenix project I'm using as a test app of sorts. If I want to use a local version of elixir source code that I'm using (and making changes on), how do I tell phoenix to use it? I also want to be able to use "iex -S mix" with it. The below elixir: ["~> 1.6.0-dev", path: '/my/local/path/to/elixir'] does not work, but it's what I'm trying to do.

我已经尝试添加以下内容,但出现语法错误.将elixir添加到依赖项(在def deps函数中)似乎没有任何作用.我还使用kiex和kerl进行长生不老药的版本配置.

I already tried adding the below and I get a syntax error. Adding elixir to the dependencies (in the def deps function) didn't seem to do anything. I'm also using kiex and kerl for elixir version configuration.

defmodule PhoenixTestApp.Mixfile do
  use Mix.Project

  def project do
    [
      app: :phoenix_testbed,
      version: "0.0.1",
      elixir: ["~> 1.6.0-dev", path: '/my/local/path/to/elixir']
      elixirc_paths: elixirc_paths(Mix.env),
      compilers: [:phoenix, :gettext] ++ Mix.compilers,
      start_permanent: Mix.env == :prod,
      aliases: aliases(),
      deps: deps()
    ]
  end
  ## some more default config code generated by Phoenix
  # :
  # :
end

推荐答案

您需要使用本地elixir二进制文件.

You need use the local elixir binary.

例如,代替iex -S mix phx.server,执行$YOUR_LOCAL_ELIXIR_PATH/bin/iex -S mix phx.server.其他内容,例如mixelixir都是相同的.

For example, instead of iex -S mix phx.server, do $YOUR_LOCAL_ELIXIR_PATH/bin/iex -S mix phx.server. Other stuff like mix, elixir are the same.

这篇关于如何在mix.exs文件中指向本地灵丹妙药版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆