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

Setting the database path. #113

Closed
declan opened this issue Dec 28, 2011 · 4 comments
Closed

Setting the database path. #113

declan opened this issue Dec 28, 2011 · 4 comments

Comments

@declan
Copy link
Contributor

declan commented Dec 28, 2011

I'm trying to set the storage_path in my config/application.rb, like this

Neo4j::Config[:storage_path] = 'db/neo4j'

This seems to work at the time (i.e. no errors, a print statement confirms it was set properly), but then both the server and the console use the old storage_path when they actually create the database. In other words, all the files are created directly in the db/ directory.

Why does the application not use the new storage path?

@andreasronge
Copy link
Member

Its à bit similar to issue #96
Not sure if I can reproduce this. Looks like the db starts before the application.rb is loaded.

@declan
Copy link
Contributor Author

declan commented Dec 28, 2011

Yeah, similar to #96. It works when I set storage_path like this

config.neo4j.storage_path = 'db/neo4j'

but not when I try to write to the Neo4j::Config object directly.

What was confusing me was actually just that the README.txt in the gem points to documentation that recommends the second approach (which doesn't work), instead of the first. I'll submit a pull request and update the README, if that works for you.

@andreasronge
Copy link
Member

Great, thanks.
The Neo4j::Config object should be used when not running from rails.

@declan
Copy link
Contributor Author

declan commented Dec 28, 2011

Ok, sent a pull request.

@declan declan closed this as completed Dec 28, 2011
dnagir pushed a commit to dnagir/neo4j that referenced this issue Jan 3, 2012
Updated the Configuration section of the README, closes neo4jrb#113
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

2 participants