Jruby: NameError: uninitialized constant Neo4j

谁说胖子不能爱 提交于 2019-12-31 04:29:25

问题


I ran this example from git: https://github.com/andreasronge/neo4j

require "rubygems"
require 'neo4j'

Neo4j::Transaction.run do
  node = Neo4j::Node.new(:name => 'andreas')
  node.outgoing(:friends) << Neo4j::Node.new(:name => 'peter')
  node.outgoing(:friends).each {|node| puts "name #{node[:name]}"}
end

and it outputted the error:

NameError: uninitialized constant Neo4j
  const_missing at org/jruby/RubyModule.java:2626
         (root) at ./neo4j.rb:4
        require at org/jruby/RubyKernel.java:1027
        require at ./neo4j.rb:36
         (root) at /Users/ZATLUKE/RubymineProjects/nokogiri/neo4j.rb:2
           load at org/jruby/RubyKernel.java:1052
         (root) at -e:1

Any ideas?

来源:https://stackoverflow.com/questions/9383118/jruby-nameerror-uninitialized-constant-neo4j

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!