didier

didier

Hi there!

I have a problem with Bolt.Sips and Phoenix. I configured my phoenix app for Bolt as explained in the github page of Bolt.sips but I have the following error while invoking Bolt.Sips.conn : (MatchError) no match of right hand side value:

It’s like the config file is not taken into account. I don’t understand what’s happening. If someone can help me, it would be fantastic! :wink:

Here is my mix.ex file :

def application do
    [mod: {ElmDbz, []},
     applications: [:phoenix, :phoenix_html, :bolt_sips, :cowboy, :logger, :gettext]]
  end

defp deps do
    [{:phoenix, "~> 1.1.6"},
     {:phoenix_html, "~> 2.4"},
     {:phoenix_live_reload, "~> 1.0", only: :dev},
     {:gettext, "~> 0.9"},
     {:cowboy, "~> 1.0"},
     {:bolt_sips, "~>0.1"},
     {:boltex, github: "florinpatrascu/boltex"}]
  end

And the config.ex file :

config :bolt_sips, Bolt,
  hostname: 'localhost',
  basic_auth: [username: "neo4j", password: "***"]

And the controller :

defmodule ElmDbz.CharacterController do
  use ElmDbz.Web, :controller

  alias Bolt.Sips, as: Bolt

  def index(conn, _params) do
    cypher = """
      MATCH (p:Person) RETURN p as character
    """

    data = Bolt.query!(Bolt.conn, cypher)
    render(conn, "index.json", characters: data)
  end

end

Showing Posts 1 to 3

NobbZ

NobbZ

Is it a typo or is your config file called config.ex? It should be config.exs.

Also I do not know how the engine does handle the newlines before and after your query, please try to use a single-double-quoted string instead.

PS: I never used that package nor do I even know what it does, nor did I use neo4j.

didier

didier OP

Yes, it’s a typo, sorry. It’s config.exs. I just look at github’s author : GitHub - florinpatrascu/bolt_movies_elixir_phoenix: A very simple web application using Neo4j with Elixir, Phoenix, and: Bolt.Sips; an Elixir driver for Neo4j’s Bolt newest network protocol. · GitHub. He is querying with multiple lines, so I did the same.

I’m pretty sure this is a configuration problem because when I use Bolt.Sips in iex, it works :

iex> {:ok, _p} = Bolt.Sips.start_link(host: “localhost”)
iex> conn = Bolt.Sips.conn
iex> Bolt.Sips.query!(conn, “MATCH (p:Person) RETURN p as character”)

NobbZ

NobbZ

First thing I stumble upon is starting the worker in the supervisor via worker(Bolt.Sips, [Application.get_env(:bolt_sips, Bolt)]), he does read the configuration manually and pass it to the worker.

You are not showing how you do handle your supervisor, so I assume you are not even having the worker in your supervision tree.

— All posts loaded —

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews