[ANN] Ruby Installer for Windows 1.8.2-14_RC5 (from Ruby 1.8.2 preview1)

C

Curt Hibbs

E.-R. Bruecklmeier said:
Thanx for the intaller. Is there a special reason, why the windows
package still comes with tk8.3 which in fact makes a lot of troubles (at
least under win98)?

No particular reason other than we haven't taken the time to update to a
newer version.

Curt
 
Z

Zakaria

Does it fix ri bug related to PAGER in WinMe [ruby-talk:103662]?
I must have missed this one. But unfortunately I don't have an ME box
to try it on anyway. If you could send me a detailed description, I can
try to fix it "in theory" and you can be my testing department :)

Here's what I do to track down the problem.
I use the latest ruby182-14_rc5.exe from Ruby Installer on rubyforge.

First I add some debug info to ri_display.rb
=============================================================================
--- ri_display.rb.orig 2004-03-25 22:31:10.000000000 +0700
+++ ri_display.rb 2004-07-26 16:35:30.000000000 +0700
@@ -223,11 +223,16 @@
@save_stdout = nil
paged = false
for pager in [ ENV['PAGER'], "less", "more <", 'pager' ].compact.uniq
+STDERR.puts "#{pager} #{path}"
if system("#{pager} #{path}")
paged = true
break
end
end
+STDERR.puts "paged: #{paged}"
+STDERR.print 'Press Enter'
+STDERR.flush
+STDIN.readline
if !paged
@options.use_stdout = true
puts File.read(path)
=============================================================================

The I try to run ri in DOS Prompt
=============================================================================
C:\WINDOWS\Desktop>ri String
less C:/WINDOWS/TEMP/ri_256695.0
more < C:/WINDOWS/TEMP/ri_256695.0
File not found
paged: true
Press Enter
=============================================================================

The problem is in system("more < file"). I try similar thing with irb
=============================================================================
irb(main):001:0> system "more < c:\autoexec.bat"
File not found
=> true
=============================================================================

Same result.

I did more experiment on irb
=============================================================================
irb(main):002:0> system 'more c:\autoexec.bat'
=> false

irb(main):003:0> system 'more.com c:\autoexec.bat'

SET windir=C:\WINDOWS
SET winbootdir=C:\WINDOWS
SET COMSPEC=C:\WINDOWS\COMMAND.COM
SET PROMPT=$p$g
SET TEMP=C:\WINDOWS\TEMP
SET TMP=C:\WINDOWS\TEMP
SET TCL_LIBRARY=c:\ruby\tcl\lib\tcl8.3
SET RUBY_TCL_DLL=c:\ruby\bin\tcl83.dll
SET RUBY_TK_DLL=c:\ruby\bin\tk83.dll
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;c:\ruby\bin
=> true

irb(main):004:0> system 'more.com < c:\autoexec.bat'

SET windir=C:\WINDOWS
SET winbootdir=C:\WINDOWS
SET COMSPEC=C:\WINDOWS\COMMAND.COM
SET PROMPT=$p$g
SET TEMP=C:\WINDOWS\TEMP
SET TMP=C:\WINDOWS\TEMP
SET TCL_LIBRARY=c:\ruby\tcl\lib\tcl8.3
SET RUBY_TCL_DLL=c:\ruby\bin\tcl83.dll
SET RUBY_TK_DLL=c:\ruby\bin\tk83.dll
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;c:\ruby\bin
=> true
=============================================================================

It appear I must use 'more.com'. So I add 'more.com' before 'more <'
=============================================================================
for pager in [ ENV['PAGER'], "less", "more.com", "more <", 'pager' ].compact.uniq
=============================================================================

Here's the result
=============================================================================
C:\WINDOWS\Desktop>ri String
less C:/WINDOWS/TEMP/ri_256695.0
more.com C:/WINDOWS/TEMP/ri_256695.0
Invalid switch
paged: true
Press Enter
=============================================================================

I believe that because the path is in UNIX style, so 'more' think it is a
DOS style command-line switch (/something).

The question is:
1. Why system('more') doesn't find more.com?
2. Why the path is in UNIX style?
3. How to change it to DOS style?
Wassallam,


-- Zakaria
(e-mail address removed) Yahoo!: z4k4ri4
http://zakaria.is-a-geek.org
http://pemula.linux.or.id
 
Z

Zakaria

I finally able to fix the problem

On Mon, Jul 26, 2004 at 07:08:57PM +0900, Zakaria wrote:

[...]
The problem is in system("more < file"). I try similar thing with irb
=============================================================================
irb(main):001:0> system "more < c:\autoexec.bat"
File not found
=> true
=============================================================================

Silly me, I forgot to escape '\'.
If i use system("more < c:\\autoexec.bat") everything will work as
expected.

The actual problem is:
1. The path is UNIX style which must be converted to DOS style before
passed on to external program.
2. For some reason in Windows ME Tempfile is working intermittenly.
As a workaround I unlink it after use and it always works.

Here's the patch
=============================================================================
--- ri_display.rb.orig 2004-03-25 22:31:10.000000000 +0700
+++ ri_display.rb 2004-07-26 22:34:26.000000000 +0700
@@ -210,7 +210,8 @@
require 'tempfile'

@save_stdout = STDOUT.clone
- STDOUT.reopen(Tempfile.new("ri_"))
+ @tempfile = Tempfile.new("ri_")
+ STDOUT.reopen(@tempfile)
end
end

@@ -219,6 +220,7 @@
def page_output
unless @options.use_stdout
path = STDOUT.path
+ path = path.gsub(%{/}, '\\\\') if Config::CONFIG['arch'] =~ /mswin/
STDOUT.reopen(@save_stdout)
@save_stdout = nil
paged = false
@@ -232,6 +234,16 @@
@options.use_stdout = true
puts File.read(path)
end
+
+ retryctr = 0
+ begin
+ retryctr += 1
+ @tempfile.unlink
+ rescue
+ sleep 0.1
+ retry if retryctr < 10
+ end
+ @tempfile = nil
end
end

=============================================================================

Dave, is the patch OK?

Wassallam,


-- Zakaria
(e-mail address removed) Yahoo!: z4k4ri4
http://zakaria.is-a-geek.org
http://pemula.linux.or.id
 
C

Curt Hibbs

This release candidate of the Ruby Installer for Windows
was built from the recently released Ruby 1.8.2 preview1.
Unless serious problems are reported, this will probably
be the last release candidate until matz releases 1.8.2
final.

There were four changes since RC5:
- tab-completion in irb now works
(thanks to _why for his help).
- The OpenGL support that was
inadvertently left out of RC5
is back in.
- Start menu shortcuts have been
added to online documentation on
ruby-doc.org.
- The "reboot" dialog message at the
end of the installation has been
removed to enable unattended
installations using the command
line arguments:
/S /D=<install dir>

You can download this release candidate from:

http://rubyforge.org/frs/?group_id=167

You can check for reported problems (or report
new problems) at:

http://rubyforge.org/tracker/?group_id=167


What is the Ruby Installer for Windows?
---------------------------------------

The Ruby Installer for Windows is a "one-click",
self-contained Windows installer that contains
the Ruby language itself, dozens of popular
extensions and packages, a syntax-highlighting
editor and execution environment, and a Windows
help file that contains the full text of the
book, "Programming Ruby: The Pragmatic Programmer's
Guide".


Change Log for 1.8.2-14_RC6
---------------------------
- This is a build of Ruby 1.8.2 preview1.
- Corrected missing OpenGL support.
- Added Start Menu shortcuts to documentation
on ruby-doc.org.
- Eliminated the installer dialog message that
warned you might need to reboot your system.
This allows for unattended installs using the
command-line arguments:
/S /D=<install dir>
- Changed the layout of the Windows registry
entries.
- Fixed a typo in a windows registry entry
(bug 643).
- Upgraded Expat to version 1.95.7
- Upgraded Ruby-odbc to version 0.993
- Upgraded DBI to 0.23
- Upgraded FXRuby to version 1.0.29
 
C

Curt Hibbs

Ok, ok... I know I said no more releases until
1.8.2 final, but Matz just released 1.8.2
preview2 so I thought I would get an installer
out that includes this before I go on my vacation
tomorrow. There were no other changes since rc6 Enjoy!

Curt

You can download this release candidate from:
http://rubyforge.org/frs/?group_id=167


===== Original Text from RC6 Release =====

This release candidate of the Ruby Installer for Windows
was built from the recently released Ruby 1.8.2 preview1.
Unless serious problems are reported, this will probably
be the last release candidate until matz releases 1.8.2
final.

There were four changes since RC5:
- tab-completion in irb now works
(thanks to _why for his help).
- The OpenGL support that was
inadvertently left out of RC5
is back in.
- Start menu shortcuts have been
added to online documentation on
ruby-doc.org.
- The "reboot" dialog message at the
end of the installation has been
removed to enable unattended
installations using the command
line arguments:
/S /D=<install dir>

You can download this release candidate from:

http://rubyforge.org/frs/?group_id=167

You can check for reported problems (or report
new problems) at:

http://rubyforge.org/tracker/?group_id=167


What is the Ruby Installer for Windows?
---------------------------------------

The Ruby Installer for Windows is a "one-click",
self-contained Windows installer that contains
the Ruby language itself, dozens of popular
extensions and packages, a syntax-highlighting
editor and execution environment, and a Windows
help file that contains the full text of the
book, "Programming Ruby: The Pragmatic Programmer's
Guide".


Change Log for 1.8.2-14_RC6
---------------------------
- This is a build of Ruby 1.8.2 preview1.
- Corrected missing OpenGL support.
- Added Start Menu shortcuts to documentation
on ruby-doc.org.
- Eliminated the installer dialog message that
warned you might need to reboot your system.
This allows for unattended installs using the
command-line arguments:
/S /D=<install dir>
- Changed the layout of the Windows registry
entries.
- Fixed a typo in a windows registry entry
(bug 643).
- Upgraded Expat to version 1.95.7
- Upgraded Ruby-odbc to version 0.993
- Upgraded DBI to 0.23
- Upgraded FXRuby to version 1.0.29
 
J

James Britt

Curt said:
Ok, ok... I know I said no more releases until
1.8.2 final, but Matz just released 1.8.2
preview2 so I thought I would get an installer
out that includes this before I go on my vacation
tomorrow. There were no other changes since rc6 Enjoy!

Curt

You can download this release candidate from:
http://rubyforge.org/frs/?group_id=167


===== Original Text from RC6 Release =====
...
- Start menu shortcuts have been
added to online documentation on
ruby-doc.org.


The shortcut to the stdlib should be fine; the shortcut to core libs is
not.

The installer sets a shortcut to
"http://www.ruby-doc.org/docs/rdoc/1.9/"

Those are RDoc pages from a now old copy of 1.9. I believe I put them
there because of issues at the time with folks getting RDoc/ri for
1.8.something

Ye, I realize the ruby-doc.org homepage has that link under "core API";
that needs to change, though I could not right this moment tell you when
I will get to that.

Perhaps, though, you should set the href to
"http://www.ruby-doc.org/docs/rdoc/1.8/" which does not currently exist
but should.

On the other hand, for some sort of symmetry with the stdlib link, it
might be better as "http://www.ruby-doc.org/corelib/"

Or something. Suggestions welcome. (I tend to prefer URLs that follow
some sort of convention, such that if you see one or two you can make
reasonable guesses about others, though things don't always evolve that
way.)

James
 
C

Curt Hibbs

I'm in a rush at the moment, but I wanted say, just let me know what URL you
want me to use. Also, If you want me to add anything else, let me know that,
too.

Thanks,
Curt
-----Original Message-----
From: James Britt [mailto:[email protected]]
Sent: Friday, July 30, 2004 3:53 PM
To: ruby-talk ML
Cc: (e-mail address removed)
Subject: Re: [ANN] Ruby Installer for Windows 1.8.2-14 **RC7**


Curt said:
Ok, ok... I know I said no more releases until
1.8.2 final, but Matz just released 1.8.2
preview2 so I thought I would get an installer
out that includes this before I go on my vacation
tomorrow. There were no other changes since rc6 Enjoy!

Curt

You can download this release candidate from:
http://rubyforge.org/frs/?group_id=167


===== Original Text from RC6 Release =====
...
- Start menu shortcuts have been
added to online documentation on
ruby-doc.org.


The shortcut to the stdlib should be fine; the shortcut to core libs is
not.

The installer sets a shortcut to
"http://www.ruby-doc.org/docs/rdoc/1.9/"

Those are RDoc pages from a now old copy of 1.9. I believe I put them
there because of issues at the time with folks getting RDoc/ri for
1.8.something

Ye, I realize the ruby-doc.org homepage has that link under "core API";
that needs to change, though I could not right this moment tell you when
I will get to that.

Perhaps, though, you should set the href to
"http://www.ruby-doc.org/docs/rdoc/1.8/" which does not currently exist
but should.

On the other hand, for some sort of symmetry with the stdlib link, it
might be better as "http://www.ruby-doc.org/corelib/"

Or something. Suggestions welcome. (I tend to prefer URLs that follow
some sort of convention, such that if you see one or two you can make
reasonable guesses about others, though things don't always evolve that
way.)

James
 
J

James Britt

Curt said:
I'm in a rush at the moment, but I wanted say, just let me know what URL you
want me to use. Also, If you want me to add anything else, let me know that,
too.

Thanks,
Curt

I've replaced the 1.9 rdocs with 1.8.2 RC rdocs.

The "Core API" link is now
http://www.ruby-doc.org/core/

So that should be the URL for 'Ruby Core API' shortcut created by the
installer.



Thanks for all the work!


James Britt
 
D

Dave Thomas

The actual problem is:
1. The path is UNIX style which must be converted to DOS style before
passed on to external program.
2. For some reason in Windows ME Tempfile is working intermittenly.
As a workaround I unlink it after use and it always works.

Here's the patch
=======================================================================
======
--- ri_display.rb.orig 2004-03-25 22:31:10.000000000 +0700
+++ ri_display.rb 2004-07-26 22:34:26.000000000 +0700
@@ -210,7 +210,8 @@
require 'tempfile'

@save_stdout = STDOUT.clone
- STDOUT.reopen(Tempfile.new("ri_"))
+ @tempfile = Tempfile.new("ri_")
+ STDOUT.reopen(@tempfile)
end
end

I went to apply this patch, and discovered that it doesn't correspond
to the current 'ri' source. Is this really the version of ri being
distributed in the windows installer?


Cheers

Dave
 
N

nobu.nokada

Hi,

At Sat, 31 Jul 2004 04:52:49 +0900,
Curt Hibbs wrote in [ruby-talk:107933]:
Ok, ok... I know I said no more releases until
1.8.2 final, but Matz just released 1.8.2
preview2 so I thought I would get an installer
out that includes this before I go on my vacation
tomorrow. There were no other changes since rc6 Enjoy!

Aren't you going to change the points which I wrote in
[ruby-talk:105550] and [ruby-talk:106176]?

* envrionment variables TCL_LIBRARY and RUBY_{TCL,TK}_DLL are
set.

* duplicated files.
 
C

Curt Hibbs

At Sat, 31 Jul 2004 04:52:49 +0900,
Curt Hibbs wrote in [ruby-talk:107933]:
Ok, ok... I know I said no more releases until
1.8.2 final, but Matz just released 1.8.2
preview2 so I thought I would get an installer
out that includes this before I go on my vacation
tomorrow. There were no other changes since rc6 Enjoy!

Aren't you going to change the points which I wrote in
[ruby-talk:105550] and [ruby-talk:106176]?

* environment variables TCL_LIBRARY and RUBY_{TCL,TK}_DLL are
set.

* duplicated files.

I wanted to make these changes, but when I started to make the changes, it
wasn't clear precisely what I was supposed to do. At that time I sent you a
private email (to (e-mail address removed)) listing what I thought should be
done and asking if that was correct, but I never got a response before I had
to leave for my vacation.

Below is what I sent you (please let me know if this is correct).

Thank you,
Curt

-----Original Message-----
From: Curt Hibbs [mailto:[email protected]]
Sent: Friday, July 16, 2004 12:47 PM
To: (e-mail address removed)
Cc: Curt Hibbs
Subject: Corrections for TCL/TK


At Thu, 8 Jul 2004 20:06:36 +0900,
Curt Hibbs wrote in [ruby-talk:105566]:
Good, I like that even better! I will change the installer to not set
TCL_LIBRARY.

Correction: It couldn't find tk.tcl file when it just is not
set. It worked by moving tcl/lib/* to lib.

Another issue, there are identical files under samples/sample
and doc/Tcl/Tk-1.8.1/sample, except for several files only in
the former. Instead, *.{rb,so,lib} underneath lib are
superfluous, since they exist also under lib/ruby/1.8 and never
be used.

I am making changes to the ruby installer build in preparation for matz'
1.8.2 preview1, and I want to make sure that I correctly understand what you
have said needs to be done to fix TCL/TK in the ruby installer. This is
particularly important since I do not know anything about TCL/TK myself and
I rely on others for this advice and eventual testing.

I think the easiest way to do this is to assume that my last release
candidate, ruby182-14_rc3.exe, has been installed in the default location
(c:\ruby), and I will then describe the changes I think need to be made
using absolute paths. I'm fairly certain that this is wrong, but this is
what I got determined from your emails:

DEL C:\ruby\lib\tcl*.*
DEL C:\ruby\lib\tk*.*

MOVE DIR TREE C:\ruby\tcl\lib\
TO C:\ruby\lib

DO NOT SET VAR "TCL_LIBRARY"

Thank you for your help,
Curt
 
N

nobu.nokada

Hi,

At Wed, 4 Aug 2004 22:08:52 +0900,
Curt Hibbs wrote in [ruby-talk:108303]:
I wanted to make these changes, but when I started to make the changes, it
wasn't clear precisely what I was supposed to do. At that time I sent you a
private email (to (e-mail address removed)) listing what I thought should be
done and asking if that was correct, but I never got a response before I had
to leave for my vacation.

Unfortunately, I've not received it.
I am making changes to the ruby installer build in preparation for matz'
1.8.2 preview1, and I want to make sure that I correctly understand what you
have said needs to be done to fix TCL/TK in the ruby installer. This is
particularly important since I do not know anything about TCL/TK myself and
I rely on others for this advice and eventual testing.

I think the easiest way to do this is to assume that my last release
candidate, ruby182-14_rc3.exe, has been installed in the default location
(c:\ruby), and I will then describe the changes I think need to be made
using absolute paths. I'm fairly certain that this is wrong, but this is
what I got determined from your emails:

DEL C:\ruby\lib\tcl*.*
DEL C:\ruby\lib\tk*.*

And lib/{*-tk.rb,tk,tkextlib,README}. In other words, not
install ext/tk there.
MOVE DIR TREE C:\ruby\tcl\lib\
TO C:\ruby\lib

Also tcl\include, and remove samples/Tcl/Tk-1.8.1/sample then
move sample/sample to there.
DO NOT SET VAR "TCL_LIBRARY"

And RUBY_TCL_DLL and RUBY_TK_DLL.

Or, you could configure with --enable-tcltk_stubs option; I
recommend this so that users can select other tcl/tk versions
and locations by the above two variables.
 
C

Curt Hibbs

Thanks for the detailed instructions. I will make these changes as soon as I
can and put out RC8 so that people who use TCL/TK can have a chance to test
it.

Curt
-----Original Message-----
From: (e-mail address removed) [mailto:[email protected]]
Sent: Thursday, August 05, 2004 1:14 AM
To: ruby-talk ML
Subject: Re: [ANN] Ruby Installer for Windows 1.8.2-14 **RC7**


Hi,

At Wed, 4 Aug 2004 22:08:52 +0900,
Curt Hibbs wrote in [ruby-talk:108303]:
I wanted to make these changes, but when I started to make the changes, it
wasn't clear precisely what I was supposed to do. At that time I sent you a
private email (to (e-mail address removed)) listing what I thought should be
done and asking if that was correct, but I never got a response before I had
to leave for my vacation.

Unfortunately, I've not received it.
I am making changes to the ruby installer build in preparation for matz'
1.8.2 preview1, and I want to make sure that I correctly understand what you
have said needs to be done to fix TCL/TK in the ruby installer. This is
particularly important since I do not know anything about TCL/TK myself and
I rely on others for this advice and eventual testing.

I think the easiest way to do this is to assume that my last release
candidate, ruby182-14_rc3.exe, has been installed in the default location
(c:\ruby), and I will then describe the changes I think need to be made
using absolute paths. I'm fairly certain that this is wrong, but this is
what I got determined from your emails:

DEL C:\ruby\lib\tcl*.*
DEL C:\ruby\lib\tk*.*

And lib/{*-tk.rb,tk,tkextlib,README}. In other words, not
install ext/tk there.
MOVE DIR TREE C:\ruby\tcl\lib\
TO C:\ruby\lib

Also tcl\include, and remove samples/Tcl/Tk-1.8.1/sample then
move sample/sample to there.
DO NOT SET VAR "TCL_LIBRARY"

And RUBY_TCL_DLL and RUBY_TK_DLL.

Or, you could configure with --enable-tcltk_stubs option; I
recommend this so that users can select other tcl/tk versions
and locations by the above two variables.
 
C

Curt Hibbs

I just posted a test release of the Ruby Installer for
Windows with the TCL/TK files moved around (hopefully
into their correct locations), plus this version of the
installer does not set any environment variables for TCL.

Since I am completely ignorant of TCL/TK, so I have no
idea whether of not this will work. If you know TCL/TK
please test this version and let me know both ways (if
it works or if it doesn't). If it does not work it
would be particularly useful if you could determine why
and include in your report precisely what should be
changed.

Please send reports to curt at hibbs dot com and
include "RubyTCL" in the subject line so that my
spam filter doesn't delete it.

Thanks,
Curt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top