Skip to content
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

Can't do diesel setup with sqlite database? #806

Closed
pwoolcoc opened this issue Mar 16, 2017 · 4 comments
Closed

Can't do diesel setup with sqlite database? #806

pwoolcoc opened this issue Mar 16, 2017 · 4 comments

Comments

@pwoolcoc
Copy link

pwoolcoc commented Mar 16, 2017

$ diesel --version
diesel 0.11.0
$ sqlite3 --version
3.17.0 2017-02-13 16:02:40 ada05cfa86ad7f5645450ac7a2a21c9aa6e57d2c
$ rg "#define SQLITE_VERSION" /usr/include/sqlite3.h
124:#define SQLITE_VERSION        "3.17.0"
$ rustc --version
rustc 1.17.0-nightly (0aeb9c129 2017-03-15)
$ DATABASE_URL="sqlite:///tmp/database.sql" diesel setup
Creating database: sqlite:///tmp/database.sql
Unable to open the database file

I am having trouble doing anything through the diesel binary with a sqlite database. I feel like it must be something I'm doing wrong, but I haven't been able to figure it out. I've tried with sqlite:///tmp/database.sql and file:///tmp/database.sql with the same result. I've tried first opening the file with the sqlite3 binary and then trying diesel setup, to no avail. Can anyone tell me what I might be doing wrong here? Thanks!

@pwoolcoc
Copy link
Author

Closing this because I just had to remove the "sqlite://" from the URL. Doing DATABASE_URL=/tmp/database.sql diesel setup seems to work fine.

@sburris0
Copy link

sburris0 commented Jan 9, 2021

This really should be documented somewhere more obvious, such as the main page

@weiznich
Copy link
Member

@sburris0 Feel free to provide a PR doing this. Otherwise this is already documented as part of the SqliteConnection documentation.

@dukejones
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants