Comments (12)
Add one of the JSON gems to your project. Try OJ for example.
from neography.
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:in
parse_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.
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.
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.
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.
Can you email me the Gemfile for this project?
from neography.
What's your email address? I don't see an easy way to find it from github or your website...
from neography.
[email protected] I updated my site to make this easier to find.
from neography.
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.
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.
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.
Added dependencies to the gemfile.
from neography.
Related Issues (20)
- send authorization token
- Undefined method 'each' for nil:NilClass
- How to use the neo4j graph algorithms using neography?
- config protocol issue "://"
- Getting random SocketError: Connection refused when creating relationships on large import HOT 4
- Ruby gem contains erroneous references HOT 6
- how can I get expanded query results like in browser
- Rake task namespace
- create_spatial_index throws "No index provider 'spatial' found" for Neo4j 3.0 HOT 1
- what is the index name when I create a schema index? HOT 2
- maintaining compatability with Neo4j? HOT 1
- trying to get nodes based on relationship HOT 6
- how do I get the node or nodes related to a start node? HOT 1
- what is the format of the queries for .find?
- I am using Phase2 to get related nodes...where can I find docs on the methods? HOT 2
- how do I create a query of neo4j using the neography ruby gem? HOT 2
- what is the query format for the Phase 2 Nodes? HOT 1
- how do I pass a string for the relationship in a query? HOT 2
- can you clarify what it means Phase 2?
- getting error Neography::NeographyError: NeographyError: when i am using ActiveRecord with neo4j .
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neography.