Project

General

Profile

Actions

Feature #4784

closed

Import the JSON library

Added by lazaridis.com (Lazaridis Ilias) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
-
[ruby-core:36479]

Description

I've personally lost several hours with the JSON gem (and was still not able to resolve the problem in a way that is acceptable for end-users).

The JSON library is an important library.

It should be included into ruby 1.9, thus it works "out-of-the-box" on all platforms.

If this is for any reason not possible, then there should be some kind of "caretaker".

This means that one ruby developer takes care about the sanity of the JSON gem.

This could be e.g. the developer who is responsible for YAML (as yaml/json are somehow related).

Updated by sorah (Sorah Fukumori) almost 13 years ago

  • Status changed from Open to Rejected

It has already included in ruby 1.9.

is our including json gem not equal to yours?

Updated by lazaridis.com (Lazaridis Ilias) almost 13 years ago

Shota Fukumori wrote:

It has already included in ruby 1.9.

is our including json gem not equal to yours?

How can I test the version that you have included?

(I've ruby 1.9.2/180)

example:
gem install dm-serializer

ERROR: Error installing dm-serializer:
The 'json' native gem requires installed build tools.

dm-serializer requires json 1.4.6

http://rubygems.org/gems/dm-serializer
http://rubygems.org/gems/json

Just let me know what I should type to give you more info.

Updated by sakuro (Sakuro OZAWA) almost 13 years ago

$ ls path-to/ruby/1.9.1/json*
path-to/ruby/1.9.1/json.rb

path-to/ruby/1.9.1/json:
add/ common.rb ext.rb version.rb

dm-serializer requires json 1.4.6

this means dm-serializer uses JSON gem for JSON parsing so it can run both on 1.8 (where json library is not bundled) and 1.9.

You must distinguish gem from bundled library.

Updated by rkh (Konstantin Haase) almost 13 years ago

Ah, you again. That's a dm-serializer issue then, as their gemspec specifies the json gem as a dependency. Libraries imported to stdlib are not gems. There has been a discussion about shipping ruby with standard gems rather than putting all just in the stdlib, but I think that idea was dismissed.

Konstantin

On May 26, 2011, at 09:13 , Lazaridis Ilias wrote:

Issue #4784 has been updated by Lazaridis Ilias.

Shota Fukumori wrote:

It has already included in ruby 1.9.

is our including json gem not equal to yours?

How can I test the version that you have included?

(I've ruby 1.9.2/180)

example:
gem install dm-serializer

ERROR: Error installing dm-serializer:
The 'json' native gem requires installed build tools.

dm-serializer requires json 1.4.6

http://rubygems.org/gems/dm-serializer
http://rubygems.org/gems/json

Just let me know what I should type to give you more info.

Feature #4784: Import the JSON library
http://redmine.ruby-lang.org/issues/4784

Author: Lazaridis Ilias
Status: Rejected
Priority: Normal
Assignee:
Category: ext
Target version:

I've personally lost several hours with the JSON gem (and was still not able to resolve the problem in a way that is acceptable for end-users).

The JSON library is an important library.

It should be included into ruby 1.9, thus it works "out-of-the-box" on all platforms.

If this is for any reason not possible, then there should be some kind of "caretaker".

This means that one ruby developer takes care about the sanity of the JSON gem.

This could be e.g. the developer who is responsible for YAML (as yaml/json are somehow related).

--
http://redmine.ruby-lang.org

Updated by lazaridis.com (Lazaridis Ilias) almost 13 years ago

Sakuro OZAWA wrote:

$ ls path-to/ruby/1.9.1/json*
path-to/ruby/1.9.1/json.rb

path-to/ruby/1.9.1/json:
add/ common.rb ext.rb version.rb

dm-serializer requires json 1.4.6

this means dm-serializer uses JSON gem for JSON parsing so it can run both on 1.8 (where json library is not bundled) and 1.9.

Actually this means that although ruby 1.9 could resolve the requirement, it does not do so.

Solution could be:

  • Either ruby should signal "I have json code similar to gem x.x.x", or
  • the gem system should be told that 1.9 contains code which is equal to "json x.x.x"

You must distinguish gem from bundled library.

I could even do this (although I've another technical view of this), but what about a simple user?

You should really take care of all this.

It's possibly as simple as asking the json maintainer to give access to the repos, thus the gems binaries can be build:

https://github.com/flori/json/issues/75

Updated by naruse (Yui NARUSE) almost 13 years ago

  • Status changed from Rejected to Assigned
  • Assignee set to nobu (Nobuyoshi Nakada)

Current ext/json is not recognized as gem by RubyGems.
Nobu, please hack it :D

Actions #8

Updated by nobu (Nobuyoshi Nakada) almost 13 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r31749.
Lazaridis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • tool/rbinstall.rb (gem): install gemspec of json. fixed #4784
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0