RubyGems Beta 0.9.4.5

RubyGems 0.9.4.5 is a beta release for the upcoming 0.9.5 which adds
several new features and fixes several bugs.

To upgrade to the beta:

gem update --system --source http://segment7.net/

To file bugs:

http://rubyforge.org/tracker/?func=add&group_id=126&atid=575

When filing a bug, gem env output will be helpful in diagnosing the
issue.

If you find a bug where RubyGems crashes, please provide debug
output. You can do that with gem --debug the_command. For example:

$ gem --debug unknown_command
Exception RuntimeError' at [...]/rubygems/command_manager.rb:114 - Unknown command unknown_command ERROR: While executing gem ... (RuntimeError) Unknown command unknown_command [...]/rubygems/command_manager.rb:114:in find_command’
[…]/rubygems/command_manager.rb:103:in process_args' [...]/rubygems/command_manager.rb:74:in run’
[…]/rubygems/gem_runner.rb:39:in `run’
/usr/local/bin/gem:22

== Changes

Select new features include:

  • Automatic installation of platform gems
  • New bandwidth and memory friendlier index file format
  • “Offline” mode (–no-update-sources)
  • Bulk update threshold can be specified (-B, --bulk-threshold)
  • New gem fetch command
  • gem now has “really verbose” output when you specify -v
  • Ruby 1.9 compatible

Other changes include:

  • Time::today is deprecated and will be removed at a future date
  • gem install --include-dependencies (-y) is now deprecated since it
    is the default, use --ignore-dependencies to turn off automatic
    dependency installation
  • Multi-version diamond dependencies only are installed once
  • Processing a YAML bulk index update takes less memory
  • gem install -i makes sure all depenencies are installed
  • gem update --system reinstalls into the prefix it was originally
    installed in
  • gem update --system respects --no-rdoc and --no-ri flags
  • HTTP basic authentication support for proxies
  • Gem::Specification#platforms should no longer be a String, use
    Gem::Platform::CURRENT when building binary gems instead
  • gem env has more diagnostic information
  • require ‘rubygems’ loads less code
  • sources.gem is gone, RubyGems now uses built-in defaults
  • gem install --source will no longer add --source by default, use
    gem sources --add to make it a permanent extra source
  • gem query (list) no longer prints details by default
  • Exact gem names are matched in various places
  • mkrf extensions are now supported
  • A gem can depend on a specific RubyGems version
  • gem_server is now gem server
  • gemlock is now gem lock
  • gem_mirror is now gem mirror
  • gemwhich is now gem which
  • gemri is no longer included with RubyGems
  • index_gem_repository.rb is now gem generate_index
  • gem performs more validation of parameters
  • Custom rdoc styles are now supported
  • Gem indexer no longer removes quick index during index creation
  • Kernel#require only rescues a LoadError for the file being required
    now
  • gem dependencies can now display some information for remote gems

Notes and issues:

  • Old gem scripts (gem_mirror, gem_server, gemlock, gemri, gemwhich,
    index_gem_repository.rb) are not cleaned up
  • There still appears to be a bug related to bulk updates of YAML
    indexes

== Special Thanks

  • Daniel B. for win32 testing of early betas
  • Luis L. for help with win32 platforms
  • Tom C. for help testing and releasing the new indexer
  • Wilson B. for the new index format
  • To the rest of the RubyGems bug reporters and patch contributors

The full set of changes including contributors is included in the
ChangeLog.

== Platforms

RubyGems now automatically handles platform gems. This means that
gem install will no longer prompt for gem selection. RubyGems uses
Ruby’s built-in configuration to match the running ruby’s platform to
choose the correct gem to install. The automatically chosen platform
may be overridden with the --platform option.

The dependency, fetch, install, outdated, specification, uninstall
and update commands all respond to --platform.

For more information, see gem help platforms

== Thanks

Keep those gems coming!

– Jim & Chad & Eric (for the RubyGems team)

On Oct 12, 2007, at 10:24 PM, Eric H. wrote:

== Thanks

Keep those gems coming!

– Jim & Chad & Eric (for the RubyGems team)

Big thanks to all of the folks involved. Lots of killer stuff in
this release.

Cheers-
– Ezra Z.
– Founder & Ruby Hacker
[email protected]
– Engine Y., Serious Rails Hosting
– (866) 518-YARD (9273)

Hi,

At Sat, 13 Oct 2007 14:24:24 +0900,
Eric H. wrote in [ruby-talk:273919]:

RubyGems 0.9.4.5 is a beta release for the upcoming 0.9.5 which adds
several new features and fixes several bugs.

Regarding rubygems/installer.rb, if you use .cmd always on
Windows, you could make it in one file as:

@#{Gem.ruby.gsub(File::SEPARATOR, File::ALT_SEPARATOR)} -x “%0” %*
@exit /b %ERRORLEVEL%
#!ruby -options

ruby code succeeds…

On 10/12/07, Eric H. [email protected] wrote:

RubyGems 0.9.4.5 is a beta release for the upcoming 0.9.5 which adds
several new features and fixes several bugs.

To upgrade to the beta:

gem update --system --source http://segment7.net/

Is there a way I can install the beta without having my regular
install repaired yet? I have to reinstall anyway, so I figured I might
as well, but there isn’t anything on RubyForge that I was able to
find.


Giles B.

Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com/

On Oct 13, 2007, at 12:59 , Giles B. wrote:

On 10/12/07, Eric H. [email protected] wrote:

RubyGems 0.9.4.5 is a beta release for the upcoming 0.9.5 which adds
several new features and fixes several bugs.

To upgrade to the beta:

gem update --system --source http://segment7.net/

Is there a way I can install the beta without having my regular
install repaired yet?

Fetch this file:

http://segment7.net/temp/rubygems-0.9.4.5.tgz

Install it with:

tar -xzf rubygems-0.9.4.5.tgz
cd rubygems-0.9.4.5
ruby setup.rb

I have to reinstall anyway, so I figured I might as well, but there
isn’t anything on RubyForge that I was able to find.

This is by design. If I upload a beta gem to Rubyforge it will
become available for anybody to install with gem update --system.
Only stable versions should be available for automatic RubyGems
installation.

On 13 oct, 11:07, Nobuyoshi N. [email protected] wrote:

@#{Gem.ruby.gsub(File::SEPARATOR, File::ALT_SEPARATOR)} -x “%0” %*
@exit /b %ERRORLEVEL%
#!ruby -options

ruby code succeeds…

I see a problem with that:

Most IDEs (example, NetBeans) is looking for “gem” file, not gem.cmd
(to actually use the interpreter and the script file).

Doing this (like the approach One-Click-Installer is doing) will brake
that functionality.

And so, there will be reported issues on NetBeans tracker :stuck_out_tongue:

On Oct 13, 2007, at 12:20 , Luis L. wrote:

@#{Gem.ruby.gsub(File::SEPARATOR, File::ALT_SEPARATOR)} -x “%0” %*
that functionality.

And so, there will be reported issues on NetBeans tracker :stuck_out_tongue:

It think Nobu is talking specifically about installed bin stubs, not
about the gem command itself. On windows platforms, RubyGems
installs both “bin_name” and “bin_name.cmd”. Would this change be
acceptable then?

Also, what versions of Windows does %* work on? I see that setup.rb
is still using “%1 %2 … %9” when it installs “gem.cmd”.

Hi,

At Sun, 14 Oct 2007 06:16:12 +0900,
Eric H. wrote in [ruby-talk:273978]:

Also, what versions of Windows does %* work on? I see that setup.rb
is still using “%1 %2 … %9” when it installs “gem.cmd”.

%* works with cmd.exe, and .cmd files also require cmd.exe.
The reason of setup.rb is it has supported pre-NT system,
i.e. Windows 9X, too.

Thanks for the beta, Eric. By the way:

  • Automatic installation of platform gems

Thank the lawd! I think this’ll be a much-appreciated improvement.


Giles B.

Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com/

Eric H. wrote:

On Oct 13, 2007, at 12:20 , Luis L. wrote:

@#{Gem.ruby.gsub(File::SEPARATOR, File::ALT_SEPARATOR)} -x “%0” %*
that functionality.

And so, there will be reported issues on NetBeans tracker :stuck_out_tongue:

It think Nobu is talking specifically about installed bin stubs, not
about the gem command itself. On windows platforms, RubyGems
installs both “bin_name” and “bin_name.cmd”. Would this change be
acceptable then?

Under WinNT (and all the versions based on that kernel). slash and
backslash works the same way for paths:

D:\Users\Developer\code>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

D:\Users\Developer\code>c:/Other-Rubies/Ruby185-p12/bin/ruby.exe -v
ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32]

What specified there is add the script to the .cmd file, since he is
referencing %0 (the script) and -x to run any file as Ruby.

I’ve updated the proposed patch to fix the setup.rb and the installer
generated stubs.

http://rubyforge.org/tracker/index.php?func=detail&aid=14725&group_id=126&atid=577

Also, what versions of Windows does %* work on? I see that setup.rb
is still using “%1 %2 … %9” when it installs “gem.cmd”.

%* works from WinNT and later.

%1…%9 are used by win9x.

For the sake of compatibility I left that on the updated (-2) patch on
rubyforge.

Sorry my delay on answer this.

Luis

Am 17 Oct 2007 um 10:17 hat Luis L. geschrieben:

Under WinNT (and all the versions based on that kernel). slash and
backslash works the same way for paths:

This is not completely true:


C:\Dokume~1\All Users>

Microsoft Windows XP [Version 5.1.2600]

C:\Dokume~1\All Users>type Dokumente__Neues\Ruby_slashtest.rb
4.times {puts “Hi! I’m running!”}

C:\Dokume~1\All Users>Dokumente__Neues\Ruby_slashtest.rb
Hi! I’m running!
Hi! I’m running!
Hi! I’m running!
Hi! I’m running!

C:\Dokume~1\All Users>Dokumente/__Neues/Ruby/_slashtest.rb
Der Befehl “Dokumente” ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

TRANSLATION: The command ‘Dokumente’ is misspelled or

wasn’t found.

C:\Dokume~1\All Users>“Dokumente/__Neues/Ruby/_slashtest.rb”
Hi! I’m running!
Hi! I’m running!
Hi! I’m running!
Hi! I’m running!

Dirk T.

Dirk T. wrote:

Am 17 Oct 2007 um 10:17 hat Luis L. geschrieben:

Under WinNT (and all the versions based on that kernel). slash and
backslash works the same way for paths:

This is not completely true:


C:\Dokume~1\All Users>

Microsoft Windows XP [Version 5.1.2600]

C:\Dokume~1\All Users>type Dokumente__Neues\Ruby_slashtest.rb
4.times {puts “Hi! I’m running!”}

C:\Dokume~1\All Users>Dokumente__Neues\Ruby_slashtest.rb
Hi! I’m running!
Hi! I’m running!
Hi! I’m running!
Hi! I’m running!

C:\Dokume~1\All Users>Dokumente/__Neues/Ruby/_slashtest.rb
Der Befehl “Dokumente” ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

TRANSLATION: The command ‘Dokumente’ is misspelled or

wasn’t found.

C:\Dokume~1\All Users>“Dokumente/__Neues/Ruby/_slashtest.rb”
Hi! I’m running!
Hi! I’m running!
Hi! I’m running!
Hi! I’m running!

You’re mixing relative paths with full paths.

Gem.ruby return the full (Drive + Path + Interpreter.exe) of the ruby
executable.

In the script, the command is already quoted:

@"#{Gem.ruby}"

So there is no need to #gsub the path separators.

Luis

Nobuyoshi N. wrote:

This page may be useful:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx?mfr=true

Regards,

Dan

Giles B. wrote:

Under WinNT (and all the versions based on that kernel). slash and
backslash works the same way for paths:

This is not completely true:

In the script, the command is already quoted:

I think he’s just highlighting that there is a corner case. Sort of a
footnote mail.

Sorry to sound too harsh, was 4am when I wrote that answer. At that time
my social skills were nil.

But was a good point.

When running ruby scripts I’m used to append “ruby” to the command line,
and not call script.rb directly:

ruby script/server
ruby script/generate
ruby script/spec

That’s why I never found a issue with slashed paths… since Ruby do the
lifting.

Dirk, please excuse the harsh part of my previous mail.

Regards and thanks for providing feedback on this.

Luis

Am 17 Oct 2007 um 23:41 hat Luis L. geschrieben:

Giles B. wrote:

Under WinNT (and all the versions based on that kernel). slash
and backslash works the same way for paths:

This is not completely true:

In the script, the command is already quoted:

I think he’s just highlighting that there is a corner case. Sort of
a footnote mail.

Correct. Thanks Giles.

ruby script/spec

That’s why I never found a issue with slashed paths… since Ruby do
the lifting.

Well, as you said: Ruby itself naturally has no problem with ‘/’ as a
path separator.

Dirk, please excuse the harsh part of my previous mail.

Thank you for your apology. (This really is a polite list!) I wasn’ t
really offended, as I just wanted to stress the point, that one cannot
rely on MS Windows to parse ‘/’ ALWAYS correctly. Sometimes, when one
is lucky, one doesn’t have to get burned oneself to learn and
figuratively I already got burned…

Regards and thanks for providing feedback on this.

You’re welcome.

Under WinNT (and all the versions based on that kernel). slash and
backslash works the same way for paths:

This is not completely true:

In the script, the command is already quoted:

I think he’s just highlighting that there is a corner case. Sort of a
footnote mail.


Giles B.

Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com/