Rake interrupted with neo4j: install [community-2.1.5]

So I followed this video https://www.youtube.com/watch?v=bDjbqRL9HcM I came to the part where I have to use the rake task, then this happened:

blog$ rake neo4j:install[community-2.1.5] --trace

rake aborted!

Don't know how to build task 'neo4j:install'
/home/james/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/task_manager.rb:62:in `[]'
/home/james/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/application.rb:149:in `invoke_task'
/home/james/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/james/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/application.rb:106:in `each'
/home/james/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level'
/home/james/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/application.rb:115:in `run_with_threads'
/home/james/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level'
/home/james/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/application.rb:78:in `block in run'
/home/james/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/james/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/home/james/.rvm/gems/ruby-2.1.3/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/home/james/.rvm/gems/ruby-2.1.3/bin/rake:23:in `load'
/home/james/.rvm/gems/ruby-2.1.3/bin/rake:23:in `<main>'
/home/james/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
/home/james/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'

      

I tried this on Ubuntu 14.04. I installed rvm.io. Any suggestion how can I fix this?

+3


source to share


2 answers


I tried to put the following in the RakeFile that was created when I ran rails new: require 'neo4j/tasks/neo4j_server'

- it works, producing the following output:

/blog$ rake neo4j:install[community-2.1.5] Installing Neo4j-community-2.1.5 environment: development Neo4j Installed in to neo4j directory



I added the following to application.rb: require 'neo4j/railtie'

- now I can userails generate scaffold User name:string email:string

I have no clue why this works. Maybe you can give a good explanation?

0


source


If you want all rake related neo4j tasks included in your project, add this code to your Rakefile:

require 'neo4j/rake_tasks'

      

This is because the gem neo4j-rake_tasks is automatically added with the neo4j gem, but you still need to include it in your Rakefile.



after that: rake -T you should see:

rake neo4j:change_password                   # Neo4j 2.2: Change connection password
rake neo4j:config[environment,port]          # Configure Server, e.g
rake neo4j:disable_auth[environment]         # Neo4j 2.2: Disable Auth
rake neo4j:enable_auth[environment]          # Neo4j 2.2: Enable Auth
rake neo4j:info[environment]                 # Get info the Neo4j Server
rake neo4j:install[edition,environment]      # Install Neo4j with auth disabled in v2.2+
rake neo4j:migrate[task_name,subtask]        # Run a script against the database to perform system-wide changes
rake neo4j:reset_yes_i_am_sure[environment]  # Reset the Neo4j Server
rake neo4j:restart[environment]              # Restart the Neo4j Server
rake neo4j:start[environment]                # Start the Neo4j Server
rake neo4j:start_no_wait[environment]        # Start the Neo4j Server asynchronously
rake neo4j:stop[environment]                 # Stop the Neo4j Server

      

0


source







All Articles