Jruby:NameError:未初始化的常量Neo4j

时间:2012-02-21 18:33:41

标签: ruby macos jruby neo4j

我从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

并输出错误:

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

有什么想法吗?

0 个答案:

没有答案