9,642 questions
1
vote
0
answers
104
views
Pulling schema updates from Postgres
I have few node microservices connected to single postgres db. I also have an elixir service for realtime message passing between BE and FE.
I am now enhancing realtime service with some additional ...
Advice
0
votes
1
replies
58
views
How can I pass the --no-validate-compile-env flag on the command-line?
I am getting this when trying to test my Elixir application:
$ mix test
** (Mix) the application :sweetsql has a different value set for key DBConnection during runtime compared to compile time. ...
0
votes
1
answer
116
views
Is there a way to have a global variable in elixir
I have this way to compare user accounts, to help prevent duplicates.
When I do the compare I pass in the two accounts, and the function returns 0 -> 1.0 where 1.0 is a perfect match. There is ...
0
votes
1
answer
96
views
How to specify a target module name to EEx.function_from_file
In my project I'm compiling templates into functions with EEx.function_from_file. The process is automated with the __using__ macro, the name of the function is the basename of the file while the name ...
1
vote
1
answer
155
views
How to get full PATH with asdf
I'm developing an LSP for the Elixir language.
The way it works at a high level is that it spawns a VM to build the user project, and I need to find the user's elixir executable to ensure the VM that ...
0
votes
2
answers
99
views
Phoenix handle event behaving different in terms of scope and immutability
Hi I have a elixir code which
defmodule Test do
def testScope do
biolink = %{}
biolink = biolink |> Map.put("slug","qweqw")
IO.inspect(biolink)
if true do
...
1
vote
0
answers
87
views
Elixir Phoenix Render Error per online Tutorial
I'm doing the basic getting started tutorial at the Elixir Phoenix website: https://hexdocs.pm/phoenix/request_lifecycle.html
I followed the instructions for creating a basic page via:
route
...
1
vote
1
answer
151
views
Phoenix LiveView - make current user available to whole view stack
I'm working on my first Elixir / Phoenix project, having spent my last decade in Rails, and I find myself missing something I'm to having easy access to.
Rails has a CurrentAttributes class, which ...
0
votes
3
answers
178
views
Efficient way to calculate score from a list of scoring criteria and select the highest scoring option
I'm looking for a general algorithm or approach to solving this type of problem (a name or some keywords, I don't know what to Google for). I have a list of options. All of them are valid, but some ...
0
votes
0
answers
97
views
Phoenix LiveView stream only shows first page of data; “Load more” inserts data but "terminates" websocket with KeyError :team_number not found
I'm still learning Phoenix LiveView and trying to make a simple paginated list of teams using stream/3. The first page loads and shows fine, but when I click a "load more" button to add more ...
2
votes
1
answer
298
views
Neovim+ElixirLS only working for one of my projects
I am currently playing around with Neovim and ElixirLS.
I have two very similar Phoenix projects, but the ElixirLS integration only works for one of them and I can't figure out what is the reason, ...
2
votes
0
answers
45
views
Connect to oracle db using proxy user in erlang
Please tell me how to connect using a proxy user, and is such a connection supported?
For example, user like “proxy_user[actual_user]”
ConnOpts = [
{host, Host},
{port, Port},
{user, “proxy_user[...
0
votes
0
answers
53
views
Locate position of specific text in an image of text in Elixir
I have an image of text, created this way:
image_of_text = Image.Text.simple_text!(
"This is some text with an [icon] surrounded by square brackets",
[ width: 500, height: 100, font_size:...
3
votes
0
answers
228
views
Why do I keep getting a 'nxdomain' error?
I can't figure out how to resolve this problem. I tried everything, but it does not work:
iex(2)> HTTPoison.get("google.com")
{:error, %HTTPoison.Error{reason: :nxdomain, id: nil}}
Even ...
0
votes
1
answer
75
views
How can I rigorously test an Elixir application that depends on both AMQP and AWS S3?
When I run mix test, the supervision tree declared in Application.ex attempts to start, which in turn attempts to start AMQP connections, but because the AMQP broker is unavailable in the test ...