Skip to content

Instantly share code, notes, and snippets.

@arunagw
Created September 13, 2011 19:11
Show Gist options
  • Select an option

  • Save arunagw/1214760 to your computer and use it in GitHub Desktop.

Select an option

Save arunagw/1214760 to your computer and use it in GitHub Desktop.
JRuby with JSON 1.6.0
ubuntu@srv-zcq3y:~/clones/rails/activerecord$ gem install json
Fetching: json-1.6.0-java.gem (100%)
Successfully installed json-1.6.0-java
1 gem installed
ubuntu@srv-zcq3y:~/clones/rails/activerecord$ irb
jruby-1.6.4 :001 > require 'rubygems'
=> true
jruby-1.6.4 :002 > require 'json'
NameError: uninitialized constant JSON::Ext::Parser
from org/jruby/RubyModule.java:2569:in `const_missing'
from /home/ubuntu/.rvm/gems/jruby-1.6.4/gems/json-1.6.0-java/lib/json/ext.rb:10:in `Ext'
from /home/ubuntu/.rvm/gems/jruby-1.6.4/gems/json-1.6.0-java/lib/json/ext.rb:6:in `JSON'
from /home/ubuntu/.rvm/gems/jruby-1.6.4/gems/json-1.6.0-java/lib/json/ext.rb:3:in `(root)'
from org/jruby/RubyKernel.java:1038:in `require'
from /home/ubuntu/.rvm/gems/jruby-1.6.4/gems/json-1.6.0-java/lib/json/ext.rb:29:in `require'
from /home/ubuntu/.rvm/gems/jruby-1.6.4/gems/json-1.6.0-java/lib/json.rb:58:in `JSON'
from /home/ubuntu/.rvm/gems/jruby-1.6.4/gems/json-1.6.0-java/lib/json.rb:54:in `(root)'
from org/jruby/RubyKernel.java:1038:in `require'
from /home/ubuntu/.rvm/gems/jruby-1.6.4/gems/json-1.6.0-java/lib/json.rb:32:in `require'
from (irb):2:in `evaluate'
from org/jruby/RubyKernel.java:1088:in `eval'
from /home/ubuntu/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/irb.rb:158:in `eval_input'
from /home/ubuntu/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /home/ubuntu/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/irb.rb:155:in `eval_input'
from org/jruby/RubyKernel.java:1419:in `loop'
from org/jruby/RubyKernel.java:1191:in `catch'
from /home/ubuntu/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /home/ubuntu/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1191:in `catch'
from /home/ubuntu/.rvm/rubies/jruby-1.6.4/lib/ruby/1.8/irb.rb:70:in `start'
from /home/ubuntu/.rvm/rubies/jruby-1.6.4/bin/irb:17:in `(root)'jruby-1.6.4 :003 > exit
ubuntu@srv-zcq3y:~/clones/rails/activerecord$ gem list json
*** LOCAL GEMS ***
json (1.6.0 java)
ubuntu@srv-zcq3y:~/clones/rails/activerecord$ ruby -v
jruby 1.6.4 (ruby-1.8.7-p330) (2011-08-23 17ea768) (OpenJDK Server VM 1.6.0_22) [linux-i386-java]
ubuntu@srv-zcq3y:~/clones/rails/activerecord$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment