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

Cannot use server mode on Jruby. #801

Open
vantonio opened this issue May 15, 2015 · 9 comments
Open

Cannot use server mode on Jruby. #801

vantonio opened this issue May 15, 2015 · 9 comments

Comments

@vantonio
Copy link

application.rb:

config.neo4j.session_type = :server_db 
config.neo4j.session_path = 'http://172.17.0.14:7474'
config.neo4j.session_options = { basic_auth: { username: 'neo4j', password: '****'} }
config.generators do |g|
  g.orm             :neo4j
end

with the configs above, I can't start the server. Logs are:

LoadError: no such file to load -- neo4j-community
/usr/local/bundle/gems/neo4j-core-4.0.7/lib/neo4j-embedded.rb:3:in `<top>'
/usr/local/bundle/gems/neo4j-core-4.0.7/lib/neo4j-core.rb:1:in `<top>'
/usr/local/bundle/gems/neo4j-core-4.0.7/lib/neo4j-core.rb:24:in `<top>'
/usr/local/bundle/gems/neo4j-4.1.5/lib/neo4j.rb:1:in `block in (root)'
/usr/local/bundle/gems/neo4j-4.1.5/lib/neo4j.rb:12:in `block in (root)'
/usr/local/bundle/gems/bundler-1.9.8/lib/bundler/runtime.rb:1:in `(root)'
/usr/local/bundle/gems/bundler-1.9.8/lib/bundler/runtime.rb:76:in `require'
/usr/local/bundle/gems/bundler-1.9.8/lib/bundler/runtime.rb:72:in `<top>'
/usr/local/bundle/gems/bundler-1.9.8/lib/bundler/runtime.rb:61:in `<top>'
/usr/local/bundle/gems/bundler-1.9.8/lib/bundler.rb:134:in `require'
@cheerfulstoic
Copy link
Contributor

I think you'll need to (at least for now) put the neo4j-community into your Gemfile / gem environment. This is a good point, though, I don't know that we should always assume that people using JRuby are going to use Neo4j in embedded mode.

@vantonio
Copy link
Author

Thank you @cheerfulstoic, after I put gem 'neo4j-community' into Gemfile, rails was able to start. I think we should mention this in the docs, in case someone run into the same situation.

@vantonio
Copy link
Author

Should I close this and submit a new issue titled "Document server mode on jruby"?

@cheerfulstoic
Copy link
Contributor

I just updated the wiki here:

https://github.com/neo4jrb/neo4j/wiki/Neo4j-v3-Setup

I'd still like to keep this issue open, though, because we still need to fix is so that you don't need to include either the neo4j-community or neo4j-enterprise gems if you're using JRuby in server mode.

(:+1:s welcome from anybody doing this so that we can know if this is a priority)

@purbon
Copy link

purbon commented Sep 15, 2015

@cheerfulstoic I was wishing to update the logstash input and output plugin to use the server api, however I found this issue.

The problem in there is that both elasticsearch and neo4j use conflicting lucene versions. I willing to take this issue, but would love some guide on how to fix it.

Thanks!

@cheerfulstoic
Copy link
Contributor

I don't have much experience with Java, unfortunately (@subvertallchris might be of more help, though he's busy with a new job at the moment).

@purbon
Copy link

purbon commented Sep 17, 2015

Hi,
well this actually would be more on the side of lot requiring any neo4j
dependency jars (neo4j-community or neo4j-enterprise) when using the REST
API. Do you know how hard would be to make this happen?

/cheers

  • purbon

On Thu, Sep 17, 2015 at 8:16 AM Brian Underwood [email protected]
wrote:

I don't have much experience with Java, unfortunately (@subvertallchris
https://github.com/subvertallchris might be of more help, though he's
busy with a new job at the moment).


Reply to this email directly or view it on GitHub
#801 (comment).

@cheerfulstoic
Copy link
Contributor

I just realized that it's actually probably pretty easy. I've just pushed a change up to master. Could you try the following?

Gemfile:

gem 'neo4j-core', github: 'neo4jrb/neo4j-core'

And then set the WITHOUT_NEO4J_EMBEDDED to true when running your app.

@cheerfulstoic
Copy link
Contributor

If that works I'll cherry pick it into the 5.1.x branch and make a release

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

3 participants