System & changes to ENV on Windows


(Johan Holmberg) #1

I try to use Ruby on Windows (NT),
but I noted that changes to the PATH environment variable didn’t
affect how executables were found by “system”.

It also seems that no environment-variable changes are propagated
to child processes.

I have looked at the Ruby source, and found some code (in hash.c)
that isn’t used normally, but can be activated by the CPP symbol
USE_WIN32_RTL_ENV (the code seems to be copied from some old
version of Perl).

My questions are:

  • wouldn’t Ruby be much more useful on Windows if it worked
    like other script-languages with regard to system, ENV and PATH ?

  • has anyone used the code enabled by the USE_WIN32_RTL_ENV
    symbol ? Does the code work ?

  • if it works, wouldn’t it be a good idea to have enabled by
    default ?

I’m using Ruby 1.6.6 built from source, and have also tried the
pre-compiled package provided at RubyCentral (ruby-166-0.exe).

/Johan Holmberg


(U.Nakamura) #2

Hello,

At Jun.16,2002 07:14:16, holmberg@iar.se wrote on
"system & changes to ENV on Windows" :

I try to use Ruby on Windows (NT),
but I noted that changes to the PATH environment variable didn’t
affect how executables were found by “system”.
(snip)
My questions are:

  • wouldn’t Ruby be much more useful on Windows if it worked
    like other script-languages with regard to system, ENV and PATH ?

This problem is already fixed in ruby 1.7.

  • has anyone used the code enabled by the USE_WIN32_RTL_ENV
    symbol ? Does the code work ?

  • if it works, wouldn’t it be a good idea to have enabled by
    default ?

Although I tested this code, I forget a result. ;-(
However, I remember that there was a certain problem.

Regards,

···


U.Nakamura usa@osb.att.ne.jp


(Johan Holmberg) #3
  • wouldn’t Ruby be much more useful on Windows if it worked
    like other script-languages with regard to system, ENV and PATH ?

This problem is already fixed in ruby 1.7.

Ok, how do I get hold of a suitable 1.7 version of Ruby ?
Rubys “home page” says “Devel is 1.7.2”, but there is no link to
where that can be found.

And another link says “Stable snapshot is available. (2001-01-18)”,
which seems to be very old by now.

If I as an ordinary Ruby user, want to use something newer than
1.6.7, what should I try ?

From the web-page it seems that use of a newer version is
discouraged. Is that right ?

  • has anyone used the code enabled by the USE_WIN32_RTL_ENV
    symbol ? Does the code work ?

  • if it works, wouldn’t it be a good idea to have enabled by
    default ?

Although I tested this code, I forget a result. ;-(
However, I remember that there was a certain problem.

This makes me nervous. What is “certain problem” ?

If I found a suitable 1.7 version I would try for myself, to see of
things work as I expect. But as I wrote above I don’t understand
where to find it.

/Johan Holmberg

···

On Sun, 16 Jun 2002, U.Nakamura wrote:


(Lyle Johnson) #4

Ok, how do I get hold of a suitable 1.7 version of Ruby ?
Rubys “home page” says “Devel is 1.7.2”, but there is no link to
where that can be found.

You can download a snapshot of the latest CVS sources for Ruby 1.7 here:

ftp://ftp.ruby-lang.org/pub/ruby/snapshot.tar.gz

or you can download a snapshot of the latest CVS sources for Ruby 1.6 here:

ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz

You can also check out the code from CVS yourself by following the
instructions on this page:

http://www.ruby-lang.org/en/cvsrepo.html

And another link says “Stable snapshot is available. (2001-01-18)”,
which seems to be very old by now.

I think that date (2001-01-18) indicates when Matz first started providing
downloadable “snapshots” of the CVS repository. But the snapshots themselves
are updated every night (I guess).

If I as an ordinary Ruby user, want to use something newer than
1.6.7, what should I try?

If it is the case that the bug fix you need was only made for Ruby 1.7 (i.e.
if it wasn’t back-ported to Ruby 1.6) you’ll need to try out the Ruby 1.7
snapshot.

From the web-page it seems that use of a newer version is
discouraged. Is that right ?

A lot of people are using Ruby 1.7 at this time, even though it is the
development version and not the “stable” release. It seems fairly stable at
this point, but the usual caveats about using a development version instead
of the release version still apply.


(Johan Holmberg) #5

You can download a snapshot of the latest CVS sources for Ruby 1.7 here:

ftp://ftp.ruby-lang.org/pub/ruby/snapshot.tar.gz
[...]

Thanks for the information about “stable”, “snapshot”, etc.

I should probably have been able to guess some things myself,
but I can’t help feeling that www.ruby-lang.org is mildly confusing
(what does “Devel is 1.7.2” mean for example ?).

I think that date (2001-01-18) indicates when Matz first started providing
downloadable “snapshots” of the CVS repository. But the snapshots themselves
are updated every night (I guess).

Oh, I understand.
But I don’t understand why this date is important.
I think it would be much more relevant to mention the date when the
"stable snapshot" was made.

From the web-page it seems that use of a newer version is
discouraged. Is that right ?

A lot of people are using Ruby 1.7 at this time, even though it is the
development version and not the “stable” release. It seems fairly stable at
this point, but the usual caveats about using a development version instead
of the release version still apply.

Since 1.7 seems to be provided as “snapshots”, does this mean that
every user of 1.7 can have a potentially different version ?
(depending on when they “happened” to fetch the sources)

Since the 1.7 snapshots seem to be done every night, I guess they
can’t all be equally “fairly stable” !??

/Johan Holmberg

···

On Tue, 18 Jun 2002, Lyle Johnson wrote:


(Yukihiro Matsumoto) #6

Hi,

···

In message “Re: system & changes to ENV on Windows” on 02/06/18, Johan Holmberg holmberg@iar.se writes:

Since 1.7 seems to be provided as “snapshots”, does this mean that
every user of 1.7 can have a potentially different version ?
(depending on when they “happened” to fetch the sources)

Use CVS to fetch the bleeding edge source tree.

						matz.

(Tobi Reif) #7

Johan Holmberg wrote:

Thanks for the information about “stable”, “snapshot”, etc.

I should probably have been able to guess some things myself,
but I can’t help feeling that www.ruby-lang.org is mildly confusing
(what does “Devel is 1.7.2” mean for example ?).

I agree.

“Ruby Versions: Stable is 1.6.7 /Devel is 1.7.2”

The first one is linked, the second isn’t.

On
http://www.ruby-lang.org/en/download.html

there’s no mention of 1.7.2

Tobi

···


http://www.pinkjuice.com/


(Lyle Johnson) #8

Since 1.7 seems to be provided as “snapshots”, does this mean that
every user of 1.7 can have a potentially different version ?
(depending on when they “happened” to fetch the sources)

Yes, I believe that is true. As far as I know, there was never (for example)
an official release of Ruby 1.7.1. It seemed to just “slide” into Ruby 1.7.2
at some point :wink:

Since the 1.7 snapshots seem to be done every night, I guess they
can’t all be equally “fairly stable” !??

I did just discover a separate snapshots subdirectory:

ftp://ftp.ruby-lang.org/pub/snapshots

that may be worth investigating. There are Ruby 1.7 releases tagged with
certain dates, which perhaps indicates that they are more stable (whatever
that means :wink: than the nightly snapshots.