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

Fix Issue with HA console when ruby-debug is loaded #261

Merged
merged 1 commit into from
Jun 18, 2013

Conversation

thekendalmiller
Copy link
Contributor

Fixes issue #240

andreasronge added a commit that referenced this pull request Jun 18, 2013
Fix Issue with HA console when ruby-debug is loaded
@andreasronge andreasronge merged commit 22062ba into neo4jrb:master Jun 18, 2013
@dwbutler
Copy link

@thekendalmiller, I just tried this (using neo4j 2.3.0) and initially couldn't get it to work. I put require 'neo4j/rails/ha_console/railtie' into my development.rb, but the console block in the railtie never fired.

I ended up putting the require in application.rb. This is less than ideal since I don't want HA turned on in every environment (such as in test).

This seems to be a limitation of Rails, unfortunately. There should probably be a note about this in the Neo4j.rb wiki.

@thekendalmiller
Copy link
Contributor Author

@dwbutler I have the require in application.rb like the neo4j.rb documentation stated. Perhaps development.rb (and other environments) are loaded at a later point after the console event has already fired.

require 'neo4j/rails/ha_console/railtie' if Rails.env.development?
and
config.neo4j.storage_path = "#{config.root}/db/neo4j-#{Rails.env}" unless Rails.env.development?

@dwbutler
Copy link

Alright, thanks. I added a note to the wiki so others don't make the same mistake I did.

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

Successfully merging this pull request may close these issues.

3 participants