Skip to content

Instantly share code, notes, and snippets.

@chetan
Created June 6, 2013 20:59
Show Gist options
  • Save chetan/5724882 to your computer and use it in GitHub Desktop.
Save chetan/5724882 to your computer and use it in GitHub Desktop.
multi_json error
source "https://rubygems.org"
gem "multi_json"
gem "oj"
gem "json"
# Gems included by the bundle:
# * bundler (1.3.4)
# * json (1.8.0)
# * multi_json (1.7.6)
# * oj (2.0.14)
$ ./test.rb
/Users/chetan/.rvm/gems/ruby-2.0.0-p195/gems/multi_json-1.7.6/lib/multi_json/adapter.rb:35:in `collect_load_options': undefined method `[]' for nil:NilClass (NoMethodError)
from /Users/chetan/.rvm/gems/ruby-2.0.0-p195/gems/multi_json-1.7.6/lib/multi_json/adapter.rb:25:in `load'
from /Users/chetan/.rvm/gems/ruby-2.0.0-p195/gems/multi_json-1.7.6/lib/multi_json.rb:132:in `load'
#!/usr/bin/env ruby
require "multi_json"
# MultiJson.load_adapter(:json_gem).activate! # fixes error
puts MultiJson.load("{}", :adapter => :json_gem)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment