I start a phoenix application server by: iex -S mix phoenix.server and get the following error:
[error] GenServer #PID<0.10289.0> terminating
** (UndefinedFunctionError) undefined function List.Chars.to_charlist/1
(elixir) List.Chars.to_charlist("localhost")
(postgrex) lib/postgrex/protocol.ex:46: Postgrex.Protocol.connect/1
(db_connection) lib/db_connection/connection.ex:134: DBConnection.Connection.connect/2
(connection) lib/connection.ex:622: Connection.enter_connect/5
(stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
I think it may caused by my config.exs:
config :bCareServer, BCareServer.Repo,
adapter: Ecto.Adapters.Postgres,
database: "bcareserver_dev",
hostname: "localhost",
pool_size: 10
The database has not been setup. When I run `mix ecto.setup, it gets the same error.
Postgresql works well:
[root@Makercas001 bCareDev]#su - postgres
[postgres@Makercas001 ~]$psql
psql (9.5.3)
Type "help" for help.
postgres=#
And it works fine on my MacBook, and only fails on CentOS. Environment: CentOS6.5, Erlang/OTP 18, Elixir 1.2.6.
psqlinstalled with the same credentials? - PatNowak