小编Dev*_*anu的帖子

适配器Ecto.Adapters.Postgres未编译

我无法创建我的凤凰项目.会喜欢一些关于如何修复它的建议.

设置细节:

  • Ubuntu 16.04.4 LTS
  • Erlang/OTP 21 [erts-10.1] [source] [64-bit] [smp:1:1] [ds:1:1:10] [async-threads:1] [hipe]
  • Elixir 1.7.3(使用Erlang/OTP 20编译)
  • 混合1.7.3(用Erlang/OTP 20编译)
  • Ecto v3.0.0

我正在关注Phoenix Up and Running制作应用程序.

mix phx.new hello
cd hello
mix ecto.create
Run Code Online (Sandbox Code Playgroud)

最后一个命令给了我:

 == Compilation error in file lib/hello/repo.ex ==
 ** (ArgumentError) adapter Ecto.Adapters.Postgres was not compiled, ensure it is correct and it is included as a project dependency
     lib/ecto/repo/supervisor.ex:71: Ecto.Repo.Supervisor.compile_config/2
     lib/hello/repo.ex:2: (module)
     (stdlib) erl_eval.erl:680: :erl_eval.do_apply/6
     (elixir) lib/kernel/parallel_compiler.ex:206: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6
Run Code Online (Sandbox Code Playgroud)

我安装了postgres.我有postgres超级用户.

postgresql elixir ecto phoenix-framework

22
推荐指数
2
解决办法
2991
查看次数

Unix 域套接字上的 Postgres 连接“/tmp/.s.PGSQL.5432”?

我正在运行 MacOS 10.14.1(MacOS 的新手),我无法运行psql通过 安装的命令brew,我收到以下错误,希望得到一些帮助:

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Run Code Online (Sandbox Code Playgroud)

我尝试过的解决方案

  1. brew services start 服务已经在运行
  2. brew services stop postgresql, brew services start postgresql 还是一样的错误
  3. brew remove postgres, brew install postgres, psql 还是一样的错误
  4. brew unlink postgresql && brew link postgresql 还是一样的错误
  5. rm -f /usr/local/var/postgres/postmaster.pid我的/usr/local/var/不包含postgres/文件夹

还有一件事要注意,当brew install postgres我收到警告时:

Warning: The post-install step …
Run Code Online (Sandbox Code Playgroud)

postgresql macos homebrew

5
推荐指数
1
解决办法
6447
查看次数

Gitlab dpl 问题与 ruby​​ 版本

我有一个通过 Gitlab 部署的节点应用程序。我正在使用 docker image node:12.8.0

最近部署失败,出现以下错误

 $ dpl --provider=heroku --app=$HEROKU_DEVELOPMENT_APP --api-key=$HEROKU_API_KEY --skip-cleanup
 Installing deploy dependencies
 ERROR:  Error installing dpl-heroku:
     faraday requires Ruby version >= 2.4.
 Successfully installed multipart-post-2.1.1
 Successfully installed ruby2_keywords-0.0.2
 /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- dpl/provider/heroku (LoadError)
     from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
     from /var/lib/gems/2.3.0/gems/dpl-1.10.15/lib/dpl/provider.rb:93:in `rescue in block in new'
     from /var/lib/gems/2.3.0/gems/dpl-1.10.15/lib/dpl/provider.rb:68:in `block in new'
     from /var/lib/gems/2.3.0/gems/dpl-1.10.15/lib/dpl/cli.rb:41:in `fold'
     from /var/lib/gems/2.3.0/gems/dpl-1.10.15/lib/dpl/provider.rb:67:in `new'
     from /var/lib/gems/2.3.0/gems/dpl-1.10.15/lib/dpl/cli.rb:31:in `run'
     from /var/lib/gems/2.3.0/gems/dpl-1.10.15/lib/dpl/cli.rb:7:in `run'
     from /var/lib/gems/2.3.0/gems/dpl-1.10.15/bin/dpl:5:in `'
     from /usr/local/bin/dpl:22:in `load'
     from /usr/local/bin/dpl:22:in `'
 Running after_script …
Run Code Online (Sandbox Code Playgroud)

ruby heroku gitlab gitlab-ci dpl

3
推荐指数
1
解决办法
719
查看次数