Skip to content

Instantly share code, notes, and snippets.

@hryk
Last active December 19, 2015 19:19
Show Gist options
  • Save hryk/6005083 to your computer and use it in GitHub Desktop.
Save hryk/6005083 to your computer and use it in GitHub Desktop.
# A sample Gemfile
source "https://rubygems.org"
gem "neo4j"
#!/usr/bin/env jruby
# encoding: utf-8
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]}"}
sleep 5
end
# $ file `which jruby`
# /Users/hiroyuki/.rbenv/shims/jruby: a bash script text executable
#
# $ rbenv version
# jruby-1.7.4 (set by RBENV_VERSION environment variable)
#
# $ java -version
# java version "1.6.0_51"
# Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
# Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment