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

Neo4j installation is buggy #4

Open
cheerfulstoic opened this issue Aug 17, 2015 · 1 comment
Open

Neo4j installation is buggy #4

cheerfulstoic opened this issue Aug 17, 2015 · 1 comment

Comments

@cheerfulstoic
Copy link
Contributor

I've just updated to 5.0.0.rc.2 to use the fixed rake tasks and found two issues with the install task:

When I first run bundle exec rake protected_neo4j_install[community-2.2.2,test] it installs Neo4j in db/neo4j/test/. I get all files directly under the test folder.

If I run the rake task a second time, everything runs again but this time I end up with a neo4j-community-2.2.2 folder inside db/neo4j/test/ and all newly installed files within this new folder.

Subsequent runs will fail with error:

mv: rename neo4j-community-2.2.2 to db/neo4j/test/neo4j-community-2.2.2: Directory not empty
rake aborted!
Unable to run: mv neo4j-community-2.2.2 db/neo4j/test

A way to fix this could be to remove the test directory before trying to move the extracted archive.
I do not have time right now to fork/PR but I have fixed the problem locally for UNIX systems (starting line 113 of neo4j_server.rake):

    else
      system_or_fail("tar -xvf #{downloaded_file}")
      system_or_fail("rm -rf #{install_location(args)}")
      system_or_fail("mv neo4j-#{edition} #{install_location(args)}")
      system_or_fail("rm #{downloaded_file}")
      puts 'Neo4j Installed in to neo4j directory.'
    end

Other issues

  • Well first, this fix would shamelessly overwrite everything in an existing DB folder without warning... but as I can tell from how the task works, that was already not a problem (?).
  • When the archive already exists in the project's root folder, installation will fail with error:
tar: Option -f requires an argument
Usage:
  List:    tar -tf <archive-filename>
  Extract: tar -xf <archive-filename>
  Create:  tar -cf <archive-filename> [filenames...]
  Help:    tar --help
rake aborted!
Unable to run: tar -xvf

That's because download_neo4j_unless_exists will return nil when the file already exists instead of returning the name of the (already) downloaded file.

@cheerfulstoic
Copy link
Contributor Author

Moved from neo4jrb/activegraph#823 (comment)

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

1 participant