Last active
December 19, 2015 19:19
-
-
Save hryk/6005083 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A sample Gemfile | |
source "https://rubygems.org" | |
gem "neo4j" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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