csuvi98
csuvi98

Reputation: 81

Rust, Windows 10: Diesel doesn't work, diesel setup provides no output

I am new to Rust, and I wanted to try Diesel with Postgres. I have followed the steps described here:

https://diesel.rs/guides/getting-started

But unfortunately, when it comes do diesel setup, nothing happens. I receive no output, no error messages, nothing. I have installed diesel_cli with the command install diesel_cli --no-default-features --features postgres , I have Postgres 13 on Windows 10.

This is what I have in my .env file : DATABASE_URL=postgres://postgres:pwd@localhost:5432/diesel (with pwd being my password). I have created a database named "diesel", and it is running on the Postgres server, with default settings. It is currently empty, with no tables.

I receive no output from diesel setup or diesel migrate generate create_posts. Not even an error message.

Did someone else encounter this problem as well? Any idea what can cause this?

Upvotes: 6

Views: 2641

Answers (1)

J.Krishna
J.Krishna

Reputation: 1010

If you use powershell in windows, it will not give error message. echo $LASTEXITCODE on powershell will give the error code.

get lastexitcode

Using command line will give the error message.

I added this "C:\Program Files\PostgreSQL\13\bin" to my path environment variable.

Now diesel setup and other cli commands are working.

Reference

Upvotes: 5

Related Questions