Giter Site home page Giter Site logo

Comments (12)

maxdemarzi avatar maxdemarzi commented on September 2, 2024

Add one of the JSON gems to your project. Try OJ for example.

from neography.

bao1018 avatar bao1018 commented on September 2, 2024

I included OJ , but still met the same error; I am on Mac OS

require 'bundler/setup'
=> true
require 'neography'
=> true
require 'oj'
=> true
@neo = Neography::Rest.new
=> #Neography::Rest:0x007f84f3467358"}
def create_person(name)
@neo.create_node("name" => name)
end
=> nil
johnathan = create_person('Johnathan')

NotImplementedError: MultiJsonParser has not implemented a parsing method for the :json format.
from /Users/lychen/Documents/gitbase/EmergingTechRadar/vendor1,2/ruby/1.9.1/gems/neography-0.0.31/lib/neography/multi_json_parser.rb:13:in json' from /Users/lychen/Documents/gitbase/EmergingTechRadar/vendor1,2/ruby/1.9.1/gems/httparty-0.9.0/lib/httparty/parser.rb:140:inparse_supported_format'
...
from (irb):6:in create_person' from (irb):8 from /Users/lychen/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in

'
1.9.3-p194 :009 >

from neography.

dgilliam avatar dgilliam commented on September 2, 2024

Thanks Max,

I was able to make this work with OJ, however I know I'm going to have an issue in the future with other gems having a dependency on various json libraries besides OJ. Can you suggest a way to fix this more permanently?

from neography.

maxdemarzi avatar maxdemarzi commented on September 2, 2024

Any of the JSON gems (yajl) should work. See the multijson documentation.

By the way, what did you have to do to get it to work?

from neography.

henry74 avatar henry74 commented on September 2, 2024

Hi Max - I work with Drew. Basically if we start a fresh project and just include neography and oj in the gem file we can get past that error. If I add oj to an existing Gemfile where other gems which have dependencies directly on the json gem, it will automatically be loaded.

In a case like this, multi_json is supposed to have a pecking order and pick the oj engine first but we still get the error.

So it works in a project with only neography and oj in the Gemfile but in a larger project with dependencies on the json gem, it does not work.

We've even tried to require 'multi_json' specifically and did MultiJson.engine = :oj and it still didn't work.

Any ideas how we can get around this?

Thanks,
Henry

from neography.

maxdemarzi avatar maxdemarzi commented on September 2, 2024

Can you email me the Gemfile for this project?

from neography.

henry74 avatar henry74 commented on September 2, 2024

What's your email address? I don't see an easy way to find it from github or your website...

from neography.

maxdemarzi avatar maxdemarzi commented on September 2, 2024

[email protected] I updated my site to make this easier to find.

from neography.

maxdemarzi avatar maxdemarzi commented on September 2, 2024

Only thing I've found so far is http://www.hindoogle.com/blog/2011/09/httparty-0-8-0-with-multijson-throws-nameerror-constant-jsonparser-not-defined/

No luck figuring out what's wrong yet...

from neography.

maxdemarzi avatar maxdemarzi commented on September 2, 2024

I think this particular issue was old multi_json dependencies from an old twitter gem. If anyone else runs into this, please ping me.

from neography.

henry74 avatar henry74 commented on September 2, 2024

Looks like it has to do with the feedzilla gem with the following gem dependency chain:

feedzilla 0.1.3 depends on activesupport ~> 3.1.1, and activesupport ~> 3.1.1 depends on multi_json < 1.3

Ditching feedzilla for simple-rss addressed the issue.

from neography.

maxdemarzi avatar maxdemarzi commented on September 2, 2024

Added dependencies to the gemfile.

from neography.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.