public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Bug: No json support anymore in Ruby 2.3.6
@ 2018-11-20  8:41 Ronald Fischer
  2018-11-20 13:13 ` Ken Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Ronald Fischer @ 2018-11-20  8:41 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

Since I updated Ruby to 2.3.6, the standard library json is missing:

 ruby -e 'require "json"'
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- json (LoadError)
        from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
        from -e:1:in `<main>'


The other standard libs which I tried, are present, for example:

 ruby -e 'require "yaml"; require "set"'

(no error here).

Ronald

[-- Attachment #2: cygcheck.out --]
[-- Type: application/octet-stream, Size: 35268 bytes --]

[-- Attachment #3: Type: text/plain, Size: 219 bytes --]


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bug: No json support anymore in Ruby 2.3.6
  2018-11-20  8:41 Bug: No json support anymore in Ruby 2.3.6 Ronald Fischer
@ 2018-11-20 13:13 ` Ken Brown
  2018-11-20 14:01   ` Brian Inglis
  2018-11-20 15:17   ` Ronald Fischer
  0 siblings, 2 replies; 9+ messages in thread
From: Ken Brown @ 2018-11-20 13:13 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 662 bytes --]

On 11/20/2018 3:41 AM, Ronald Fischer wrote:
> Since I updated Ruby to 2.3.6, the standard library json is missing:
> 
>   ruby -e 'require "json"'
> /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- json (LoadError)
>          from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
>          from -e:1:in `<main>'

Install the ruby-json package.

Ken
\x03B‹KCB”\x1c›Ø›\x19[H\x1c™\^[ܝ\x1cΈ\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÜ\x1c›Ø›\x19[\Ëš\x1d^[[\x03B‘TNˆ\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ˜\KÃB‘^[ØÝ[Y[\x18]\x1a[ÛŽˆ\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÙ^[ØÜËš\x1d^[[\x03B•[œÝXœØÜšX™H\x1a[™›Îˆ\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ËØÞYÝÚ[‹˜ÛÛKÛ[\vÈÝ[œÝXœØÜšX™K\Ú[\^[\x19CBƒB

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bug: No json support anymore in Ruby 2.3.6
  2018-11-20 13:13 ` Ken Brown
@ 2018-11-20 14:01   ` Brian Inglis
  2018-11-20 15:39     ` Ronald Fischer
  2018-11-20 15:17   ` Ronald Fischer
  1 sibling, 1 reply; 9+ messages in thread
From: Brian Inglis @ 2018-11-20 14:01 UTC (permalink / raw)
  To: cygwin

On 2018-11-20 06:13, Ken Brown wrote:
> On 11/20/2018 3:41 AM, Ronald Fischer wrote:
>> Since I updated Ruby to 2.3.6, the standard library json is missing:
>>   ruby -e 'require "json"'
>> /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- json (LoadError)
>>          from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
>>          from -e:1:in `<main>'
> Install the ruby-json package.

By recent ruby standards, ruby should depend on and install ruby-stdgems, which
should install ruby-libraries, ruby-default-gems, and ruby-bundled-gems, where
the latter two should depend on and install the lists of default and bundled
standard library gems, which should include ruby-json and other standard library
gems.

Packages for ruby-stdgems, ruby-default-gems, and ruby-bundled-gems could be
dummy (virtual) packages (like _obsolete packages) to define the generic and
version dependent gem lists, to make version dependent changes easier.

See https://stdgems.org/{libraries,default_gems,bundled_gems}.json

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bug: No json support anymore in Ruby 2.3.6
  2018-11-20 13:13 ` Ken Brown
  2018-11-20 14:01   ` Brian Inglis
@ 2018-11-20 15:17   ` Ronald Fischer
  1 sibling, 0 replies; 9+ messages in thread
From: Ronald Fischer @ 2018-11-20 15:17 UTC (permalink / raw)
  To: Ken Brown, cygwin

For modules which, according to the Ruby-Docs, are supposed to be in the stdlib, no Gem installation must be necessary.

With other words: A Ruby application which only uses features from the stdlib, should run on any other Ruby installation (of compatible version) without the requirement of installing a Gem.

On Tue, Nov 20, 2018, at 14:13, Ken Brown wrote:
> On 11/20/2018 3:41 AM, Ronald Fischer wrote:
> > Since I updated Ruby to 2.3.6, the standard library json is missing:
> > 
> >   ruby -e 'require "json"'
> > /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- json (LoadError)
> >          from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
> >          from -e:1:in `<main>'
> 
> Install the ruby-json package.
> 
> Ken
> \x03B‹KCB”\x1c›и›\x19[H\x1c™\^[м\x1cЮˆ\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ЫиоYнк[‹˜ллKм\x1c›и›\x19[\Ыš\x1d^[[\x03B‘TNˆ\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ЫиоYнк[‹˜ллKй˜\KУB‘^[ин[Y[\x18]\x1a
> [лŽˆ\b\b\b\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ЫиоYнк[‹˜ллKй^[имЫš\x1d^[[\x03B•[œнXœимšX™H\x1a[™›Юˆ\b\b\b\b\b\x1a\x1d\x1d\x1c\x0e‹ЫиоYнк[‹˜ллKл[\vШн[œнXœимšX™K\к[\^[\x19CBƒB

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bug: No json support anymore in Ruby 2.3.6
  2018-11-20 14:01   ` Brian Inglis
@ 2018-11-20 15:39     ` Ronald Fischer
  2018-11-20 16:26       ` Ken Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Ronald Fischer @ 2018-11-20 15:39 UTC (permalink / raw)
  To: Brian Inglis, cygwin

Hi Ken,

actually, the page regarding the gem list for the Ruby version in question (the one we have at Cygwin) is 

    https://stdgems.org/2.3.6/

but this page too lists json as "default gem". 

The page https://stdgems.org/ then defines this term as:

"Default gems: These gems are part of Ruby and you can always require them directly"

So from this I would conclude that json (and the other default gems) should be part of the Ruby installation, since "they are part of Ruby". If you disagree with my interpretation, please explain where I undersood the text in a wrong way.

BTW, I think that my viewpoint is also supported by

https://ruby-doc.org/stdlib-2.3.6/

which says that the packages listed on this page are found in the /lib directory of Ruby.

But even if I go along with your interpretation of the text, in that the default gems are delivered as a separated package, they should be available at least on the Cygwin server, and be installable from there, but I did a search for "ruby-default" and could not get a match.

Ronald

On Tue, Nov 20, 2018, at 15:00, Brian Inglis wrote:
> On 2018-11-20 06:13, Ken Brown wrote:
> > On 11/20/2018 3:41 AM, Ronald Fischer wrote:
> >> Since I updated Ruby to 2.3.6, the standard library json is missing:
> >>   ruby -e 'require "json"'
> >> /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- json (LoadError)
> >>          from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
> >>          from -e:1:in `<main>'
> > Install the ruby-json package.
> 
> By recent ruby standards, ruby should depend on and install ruby-stdgems, which
> should install ruby-libraries, ruby-default-gems, and ruby-bundled-gems, where
> the latter two should depend on and install the lists of default and bundled
> standard library gems, which should include ruby-json and other standard library
> gems.
> 
> Packages for ruby-stdgems, ruby-default-gems, and ruby-bundled-gems could be
> dummy (virtual) packages (like _obsolete packages) to define the generic and
> version dependent gem lists, to make version dependent changes easier.
> 
> See https://stdgems.org/{libraries,default_gems,bundled_gems}.json
> 
> -- 
> Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
> 
> This email may be disturbing to some readers as it contains
> too much technical detail. Reader discretion is advised.
> 
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> 

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bug: No json support anymore in Ruby 2.3.6
  2018-11-20 15:39     ` Ronald Fischer
@ 2018-11-20 16:26       ` Ken Brown
  2018-11-20 16:52         ` Ronald Fischer
  2018-11-20 17:01         ` Dan Kegel
  0 siblings, 2 replies; 9+ messages in thread
From: Ken Brown @ 2018-11-20 16:26 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1540 bytes --]

On 11/20/2018 10:39 AM, Ronald Fischer wrote:
> Hi Ken,
> 
> actually, the page regarding the gem list for the Ruby version in question (the one we have at Cygwin) is
> 
>      https://stdgems.org/2.3.6/
> 
> but this page too lists json as "default gem".
> 
> The page https://stdgems.org/ then defines this term as:
> 
> "Default gems: These gems are part of Ruby and you can always require them directly"
> 
> So from this I would conclude that json (and the other default gems) should be part of the Ruby installation, since "they are part of Ruby". If you disagree with my interpretation, please explain where I undersood the text in a wrong way.
> 
> BTW, I think that my viewpoint is also supported by
> 
> https://ruby-doc.org/stdlib-2.3.6/
> 
> which says that the packages listed on this page are found in the /lib directory of Ruby.
> 
> But even if I go along with your interpretation of the text, in that the default gems are delivered as a separated package, they should be available at least on the Cygwin server, and be installable from there, but I did a search for "ruby-default" and could not get a match.

I was just trying to tell you how to solve the problem.  I wasn't offering an 
opinion about ruby packaging or which gems should be installed by default.

Ken
\0ТÒÐÐ¥\a&ö&ÆVÒ\a&W\x06÷'G3¢\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒ÷\a&ö&ÆV×2æ‡FÖÀФd\x15\x13¢\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöf\x17\x12ðФFö7VÖVçF\x17F–öã¢\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R\x06–æfó¢\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×\x06ÆPРÐ

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bug: No json support anymore in Ruby 2.3.6
  2018-11-20 16:26       ` Ken Brown
@ 2018-11-20 16:52         ` Ronald Fischer
  2018-11-20 17:01         ` Dan Kegel
  1 sibling, 0 replies; 9+ messages in thread
From: Ronald Fischer @ 2018-11-20 16:52 UTC (permalink / raw)
  To: Ken Brown, cygwin

Hi Ken.

I see your point .... For me, the foremost issue is to confirm, whether this is indeed a bug in the Cygwin package for Ruby, or not, and my posting on the mailing list was mainly intended to draw attention from the Ruby package maintainers (although other comments are, of course, also highly preciated, and in particular without your comment, I would not have known about the concept of default gems). 

I have to maintain a consistent state of our application accross several sites (Cygwin, Linux), and so far, only the new 2.3.6 Cygwin version, which I installed tentaively, has this problem. The previous version was correct in this respect, and all those versions I'm aware of, which run on Linux, also come with json built in. 

For the time being, we just avoid updating the Ruby version on Cygwin (because it seems to be nearly impossible to go back to the previous version once you have updated a package).

BTW, the definition of "default gems" provided on the stdgems site also includes the sentence that "one can not REMOVE them" (because they are bundled with Ruby), so I think it is even risky to deliver an explicit version of this gem as part of our application, which might then be in conflict with those installation which do contain the json gem in a different version. Furthermore, explicitly installing the json gem requires also to download the C compiler and the Cygwin library bindings for Ruby, because json contains C code. I rather would prefer not opening this can of worms....

Ronald

On Tue, Nov 20, 2018, at 17:26, Ken Brown wrote:
> On 11/20/2018 10:39 AM, Ronald Fischer wrote:
> > Hi Ken,
> > 
> > actually, the page regarding the gem list for the Ruby version in question (the one we have at Cygwin) is
> > 
> >      https://stdgems.org/2.3.6/
> > 
> > but this page too lists json as "default gem".
> > 
> > The page https://stdgems.org/ then defines this term as:
> > 
> > "Default gems: These gems are part of Ruby and you can always require them directly"
> > 
> > So from this I would conclude that json (and the other default gems) should be part of the Ruby installation, since "they are part of Ruby". If you disagree with my interpretation, please explain where I undersood the text in a wrong way.
> > 
> > BTW, I think that my viewpoint is also supported by
> > 
> > https://ruby-doc.org/stdlib-2.3.6/
> > 
> > which says that the packages listed on this page are found in the /lib directory of Ruby.
> > 
> > But even if I go along with your interpretation of the text, in that the default gems are delivered as a separated package, they should be available at least on the Cygwin server, and be installable from there, but I did a search for "ruby-default" and could not get a match.
> 
> I was just trying to tell you how to solve the problem.  I wasn't offering an 
> opinion about ruby packaging or which gems should be installed by default.
> 
> Ken
> \0ТÒÐÐ¥\a&ö&ÆVÒ\a&W\x06÷'G3¢\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒ÷\a&ö&ÆV×2æ‡FÖÀФd\x15\x13¢\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöf\x17\x12ðÐ
> ¤Fö7VÖVçF\x17F–öã¢\x02\x02\x02\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R\x06–æfó¢\x02\x02\x02\x02\x02\x06‡GG\x03¢òö7–wv–
> âæ6öÒöÖÂò7Vç7V'67&–&R×6–×\x06ÆPРÐ

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bug: No json support anymore in Ruby 2.3.6
  2018-11-20 16:26       ` Ken Brown
  2018-11-20 16:52         ` Ronald Fischer
@ 2018-11-20 17:01         ` Dan Kegel
  2018-11-20 19:10           ` Brian Inglis
  1 sibling, 1 reply; 9+ messages in thread
From: Dan Kegel @ 2018-11-20 17:01 UTC (permalink / raw)
  To: cygwin

Hey all,
looking at
http://mirrors.kernel.org/sourceware/cygwin/x86_64/setup.ini
I see that there is a ruby-json package:

@ ruby-json
sdesc: "Ruby JSON module"
...

but ruby does not currently depend on ruby-json:

@ ruby
sdesc: "Interpreted object-oriented scripting language"
...
requires: cygwin libcrypt0 libdb5.3 libffi6 libgcc1 libgdbm4 libgmp10
libopenssl100 libreadline7 libssp0 libyaml0_2 ruby-did_you_mean
ruby-psych ruby-rdoc rubygems zlib0
...
depends2: cygwin, libcrypt0, libdb5.3, libffi6, libgcc1, libgdbm4,
libgmp10, libopenssl100, libreadline7, ruby-did_you_mean, ruby-psych,
ruby-rdoc, rubygems, zlib0

Maybe rubygems should, let's see:

@ rubygems
sdesc: "Ruby module management system"
ldesc: "A centralized Ruby extension management system, similar to Perl's CPAN"
category: Ruby
requires: ca-certificates ruby ruby-builder ruby-io-console
ruby-minitest ruby-minitest4 ruby-psych ruby-rake ruby-rdoc
...
depends2: ca-certificates, ruby, ruby-builder, ruby-io-console,
ruby-minitest, ruby-psych, ruby-rake, ruby-rdoc

I am not a cygwin developer, but it does kind of sound like the rubygems package
might want to depend on the packages required to provide the 'default'
gems from stdgems.org.

The right way to phrase that request would be as a patch :-) if a
cygwin ruby user who needs it has the time and energy to get into
cygwin development.
- Dan

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Bug: No json support anymore in Ruby 2.3.6
  2018-11-20 17:01         ` Dan Kegel
@ 2018-11-20 19:10           ` Brian Inglis
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Inglis @ 2018-11-20 19:10 UTC (permalink / raw)
  To: cygwin

On 2018-11-20 10:00, Dan Kegel wrote:
> Hey all,
> looking at
> http://mirrors.kernel.org/sourceware/cygwin/x86_64/setup.ini
> I see that there is a ruby-json package:
> @ ruby-json
> sdesc: "Ruby JSON module"
> ...
> but ruby does not currently depend on ruby-json:
> @ ruby
> sdesc: "Interpreted object-oriented scripting language"
> ...
> depends2: cygwin, libcrypt0, libdb5.3, libffi6, libgcc1, libgdbm4,
> libgmp10, libopenssl100, libreadline7, ruby-did_you_mean, ruby-psych,
> ruby-rdoc, rubygems, zlib0
> ...
> Maybe rubygems should, let's see:
> @ rubygems
> sdesc: "Ruby module management system"
> ...
> depends2: ca-certificates, ruby, ruby-builder, ruby-io-console,
> ruby-minitest, ruby-psych, ruby-rake, ruby-rdoc
> ...
> I am not a cygwin developer, but it does kind of sound like the rubygems
> package might want to depend on the packages required to provide the
> 'default' gems from stdgems.org.
> The right way to phrase that request would be as a patch :-) if a
> cygwin ruby user who needs it has the time and energy to get into
> cygwin development.

It's more a case of package.cygport tweaks by the ruby/library/-gems maintainer
to define packages and dependencies to get all required packages installed.

Dependencies are circular if gems depend on ruby, and ruby depends on the
standard library gems: how that is handled in packaging must be decided by the
maintainer, when they have time.

It might require a bit of restructuring so that e.g. exes and libs are packaged
as ruby-bin and ruby-lib, gems depend on bin and lib, and ruby only provides
global files but depends on all the standard bits to get them installed.

Like many developers I know enough about ruby to find and install packages I
need to run the tools I *use* sometimes, and hack a bit, but little more; same
for python, perl, .net, etc.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-11-20 19:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20  8:41 Bug: No json support anymore in Ruby 2.3.6 Ronald Fischer
2018-11-20 13:13 ` Ken Brown
2018-11-20 14:01   ` Brian Inglis
2018-11-20 15:39     ` Ronald Fischer
2018-11-20 16:26       ` Ken Brown
2018-11-20 16:52         ` Ronald Fischer
2018-11-20 17:01         ` Dan Kegel
2018-11-20 19:10           ` Brian Inglis
2018-11-20 15:17   ` Ronald Fischer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).