Skip to content

Instantly share code, notes, and snippets.

@dsaad68
Last active July 27, 2023 13:14
Show Gist options
  • Save dsaad68/6dd24150978503a7ebda10a4d1d554ef to your computer and use it in GitHub Desktop.
Save dsaad68/6dd24150978503a7ebda10a4d1d554ef to your computer and use it in GitHub Desktop.
How to install Diesel CLI in Windows

1. Install Microsoft Visual C++ Redistributable

From here.

or

choco install vcredist-all

2. Installed Visual Studio Code 2019 Community

choco install visualstudio2019community

3. Install OpenSSL

choco install openssl

4. Install PostgreSQL CLI Tool

Just Install PostgreSQL CLI Tool from here.

postgresql

5. Add PostgreSQL bin and lib to PATH

add these two paths to your PATH.

C:\Program Files\PostgreSQL\{Version}\bin
C:\Program Files\PostgreSQL\{Version}\lib

5. Add PostgreSQL lib to ENV

setx PQ_LIB_DIR="C:\Program Files\PostgreSQL\15\lib"

6. Install Diesel CLI

cargo install diesel_cli --no-default-features --features postgres --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment