yumm

yumm

ecto usage in example projects?

Hi all! I’m new to elixir and phoenix and am trying to run this project:
https://github.com/chvanikoff/reph2

I want to convert an existing react app (or at least the rest api for the database to elixir but every example project I find on Github has some sort or error regarding ecto. I’ve tried all the examples posted in https://forum.elixirforum.com/t/user-authentication-in-phoenix/118/81 but encounter similar errors to this:
could not compile dependency :phoenix_ecto, "mix compile" failed. You can recompile this dependency with "mix deps.compile phoenix_ecto", update it with "mix deps.update phoenix_ecto" or clean it with "mix deps.clean phoenix_ecto"

I’ve tried cleaning all my mix packages as well as mix.update --all.

Are all these projects just dead or am I missing something?

Also if anyone has suggestions of a working example of a elixir server with authentication (ideally with react as well) please do hesitate to share.

Thank you to the elixir developers I can see the magic in the bottle but still feel like I’m taping on the glass.

Thank you for any/all suggestions/ideas/setting me straight

Most Liked

yurko

yurko

This one seems to work, I’ve just tested it locally GitHub - chernyshof/react-phoenix-users-boilerplate: Elixir/Phoenix + React + users template/boilerplate. · GitHub and it uses Phoenix 1.3

One thing to note is that you’d have to use admin@admin.com and not just admin as stated in the readme in order to log in.

yurko

yurko

Yes, you need postgres and then you need to set up the connection, edit your dev config and set up username, password etc, s. react-phoenix-users-boilerplate/config/dev.exs at master · chernyshof/react-phoenix-users-boilerplate · GitHub

Your local database doesn’t have to be secure unless it’s open to the outside world. If you want to set the password you can do something like this:

sudo -u postgres psql
ALTER USER "postgres" WITH PASSWORD 'new_password';
NobbZ

NobbZ

Even though I can compile the dependencies on my system (Arch linux), it fails currently with the router and prints out about a billion of warnings.

Also the particular example you posted is written in phoenix 1.1, so it will give you a false sense of how things are done today.

You should search for examples that use a more current phoenix (1.3).

Sadly I can’t give you any links to small example projects, but only to a fully grown application: The hex.pm website.

Where Next?

Popular in Questions Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lists...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New

Other popular topics Top

skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31142 143
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement