I’ve recently installed Phoenix/Elixir from source on a shared server instance. I’ve configured a Postgres database and ensured it was running via the command line. I placed the database details in my devs.exs file (below)
# Configure your database
config :scandimension, Scandimension.Repo,
username: "scandimension",
password: "password",
database: "greenwavesoftware",
hostname: "localhost",
port: "12335",
pool_size: 10
I’ve verified the settings by connecting with them via the CLI.
When I run ecto.create in my Phoenix application, I get the following error:
$ mix ecto.create
** (ArgumentError) argument error
:erlang.hd([])
lib/mix/ecto.ex:46: Mix.Ecto.parse_repo/2
lib/mix/tasks/ecto.create.ex:46: Mix.Tasks.Ecto.Create.run/1
(mix) lib/mix/task.ex:331: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:79: Mix.CLI.run_task/2
$
Going directly into the database shows:
$ psql -h localhost -p 12335 greenwavesoftware
psql (9.4.21)
Type "help" for help.
greenwavesoftware=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-------------------+-----------+----------+---------+-------+-----------------------------
greenwavesoftware | chipcoons | UTF8 | C | C | =Tc/chipcoons +
| | | | | chipcoons=CTc/chipcoons +
| | | | | scandimension=CTc/chipcoons
postgres | chipcoons | UTF8 | C | C |
template0 | chipcoons | UTF8 | C | C | =c/chipcoons +
| | | | | chipcoons=CTc/chipcoons
template1 | chipcoons | UTF8 | C | C | =c/chipcoons +
| | | | | chipcoons=CTc/chipcoons
(4 rows)
greenwavesoftware=#
I’ve also tried changing the credentials used to my ‘owner’ credentials rather than the user I created for the app to use.
The server environment is Webfaction.
Any suggestions appreciated.