the*_*abh 6 elixir ecto phoenix-framework
我有一个使用默认设置构建的现有项目.现在我看到我真的不需要Ecto.我只想从代码中删除所有与DB相关的事件.
有人可以指导我完成整个过程吗?
我已经从mix.exs中删除了所有提到的Ecto,但我想这还不够
更新:
我在lib/api_test/repo.ex文件中找到了ecto.如果我删除该行,则会出现以下错误
=INFO REPORT==== 21-Jul-2016::12:43:30 ===
application: logger
exited: stopped
type: temporary
** (Mix) Could not start application api_test: ApiTest.start(:normal, []) returned an error: shutdown: failed to start child: ApiTest.Repo
** (EXIT) an exception was raised:
** (UndefinedFunctionError) function ApiTest.Repo.start_link/0 is undefined or private
(api_loc) ApiTest.Repo.start_link()
(stdlib) supervisor.erl:365: :supervisor.do_start_child/2
(stdlib) supervisor.erl:348: :supervisor.start_children/3
(stdlib) supervisor.erl:314: :supervisor.init_children/2
(stdlib) gen_server.erl:328: :gen_server.init_it/6
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Run Code Online (Sandbox Code Playgroud)
Ole*_*ann 13
我想我有一个很好的解决方案.我创建了两个新的Phoenix项目,一个使用Ecto,一个使用--no-ecto
flag(mix phoenix.new --no-ecto my_app
).然后,我在Ecto中初始化了一个Git仓库,添加并提交了所有内容,然后删除了所有文件,并将其替换为项目中使用Ecto的文件.
结果是GitHub上的这个提交.我认为你会找到一个很好的起点来改变什么.
归档时间: |
|
查看次数: |
2246 次 |
最近记录: |