New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`diesel` as a dependency does not compile when Postgres ist not installed #736

Closed
kud1ing opened this Issue Feb 18, 2017 · 5 comments

Comments

Projects
None yet
2 participants
@kud1ing

kud1ing commented Feb 18, 2017

I want to use Diesel with Sqlite only:

cargo test
   Compiling pq-sys v0.3.2
error: failed to run custom build command for `pq-sys v0.3.2`
process didn't exit successfully: `/Users/lenny/Code/ts/target/debug/build/pq-sys-ac5f013e7abb629c/build-script-build` (exit code: 101)
--- stdout
wrapper.h:1:10: fatal error: 'libpq-fe.h' file not found, err: true

--- stderr
wrapper.h:1:10: fatal error: 'libpq-fe.h' file not found
thread 'main' panicked at 'Unable to generate bindings for libpq: ()', /Users/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-mac/build/src/libcore/result.rs:837
note: Run with `RUST_BACKTRACE=1` for a backtrace.

@kud1ing kud1ing changed the title from `diesel` dependency does not compile when Postgres ist not installed to `diesel` as a dependency does not compile when Postgres ist not installed Feb 18, 2017

@sgrif

This comment has been minimized.

Member

sgrif commented Feb 18, 2017

When you say "diesel" do you mean diesel_cli? If so, you should install it with cargo install diesel_cli --no-default-features --features sqlite. If you're referring to the diesel crate itself, it doesn't rely on postgres unless you have features = ["postgres"] in your Cargo.toml.

@kud1ing

This comment has been minimized.

kud1ing commented Feb 18, 2017

Sorry, I accidentally copied the example with the Postgres feature enabled. :/

@sgrif

This comment has been minimized.

Member

sgrif commented Feb 18, 2017

Sorry, I don't fully understand what you mean. Do you still need help, or did that comment resolve the issue for you?

@kud1ing

This comment has been minimized.

kud1ing commented Feb 18, 2017

No thanks, I am fine. The issue #735 regarding the CLI maybe could be mentioned in the guide, though.

@sgrif

This comment has been minimized.

Member

sgrif commented Feb 18, 2017

Yes, we will be revamping the getting started guide so that it has a SQLite and MySQL specific page. I'll mention it once we do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment