# Rubygems-update 1.6.0 Released

**URL:** <https://www.ruby-forum.com/t/rubygems-update-1-6-0-released/203929>\
**Category:** Ruby\
**Created:** [March 2, 2011, 1:09am UTC](https://www.ruby-forum.com/t/rubygems-update-1-6-0-released/203929 "2011-03-02T01:09:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [March 2, 2011, 1:09am UTC](https://www.ruby-forum.com/t/rubygems-update-1-6-0-released/203929/1 "2011-03-02T01:09:31Z")

</div>

rubygems-update version 1.6.0 has been released!

- [http://rubygems.org](http://rubygems.org)
- [http://docs.rubygems.org](http://docs.rubygems.org)
- [http://help.rubygems.org](http://help.rubygems.org)
- [http://github.com/rubygems](http://github.com/rubygems)
- [http://rubyforge.org/projects/rubygems](http://rubyforge.org/projects/rubygems)

RubyGems is a package management framework for Ruby.

This gem is an update for the RubyGems software. You must have an  
installation of RubyGems before this update can be applied.

See Gem for information on RubyGems (or `ri Gem`)

To upgrade to the latest RubyGems, run:

$ gem update --system # you might need to be an administrator or root

See UPGRADING.rdoc for more details and alternative instructions.

* * *

If you don’t have any RubyGems install, there is still the pre-gem  
approach to  
getting software, doing it manually:

- Download from: [Download RubyGems | RubyGems.org | your community gem host](https://rubygems.org/pages/download)
- Unpack into a directory and cd there
- Install with: ruby setup.rb # you may need admin/root privilege

For more details and other options, see:

ruby setup.rb --help

Changes:

### 1.6.0 / 2011-02-29

4 Deprecations:

- RubyGems no longer requires ‘thread’. Rails \< 3 will need to add  
require  
‘thread’ to their applications.
- Gem.cache is deprecated. Use Gem.source\_index.
- RbConfig.datadir is deprecated. Use Gem.datadir.
- Gem::LoadError#version\_requirements has been removed. Use  
Gem::LoadError#requirement.

2 Major Enhancements:

- Rewrote how Gem::activate (gem and require) resolves dependencies.
- Gem::LoadError#version\_requirement has been removed. Use  
Gem::LoadError#requirement.

17 Minor Enhancments:

- Added --key to `gem push` for setting alternate API keys.
- Added --format-executable support to gem uninstall.
- Added Gem::DependencyList#clear.
- Added Gem::DependencyList#remove\_specs\_unsatisfied\_by
- Added Gem.latest\_spec\_for, latest\_version\_for, and  
latest\_rubygems\_version.
- Added Gem::Dependency#merge which merges requirements for two  
dependencies.
- Added Gem::TestCase#util\_spec for faster tests.
- Added Gem::Specification#dependent\_specs.
- Added Gem::TestCase#new\_spec and Gem::TestCase#install\_specs.
- Added flag to include prerelease gems in  
Gem::SourceIndex#latest\_specs.
- Gem.cache\_dir always references the proper cache dir.  
Pass true to support a user path.
- Gem.cache\_gem, given a filename always references the cache gem.  
Pass true to support a user path.
- Added Gem::Specification#conflicts
- Removed rdoc gem/require from test\_case.rb.
- Rubygems will no longer let you push if you’re using beta or  
unreleased  
rubygems.
- Save RAM / GC churn by removing spec.files and rdoc options from  
locally cached gem specifications.
- SpecFetcher.fetch\_spec can now take a string source\_uri.

10 Bug Fixes:

- Added missing require of Gem::RemoteFetcher to the unpack command.
- RubyGems now completely removes a previous install when reinstalling.
- Fixed Gem::Installer#generate\_bin to only chmod files that exist.
- Fixed handling of Windows style file:/// uris.
- Fixed requires in tests. (shota)
- Fixed script generation on Windows.
- Fixed test issues if you have older rubygems installed.
- Gem::DependencyInstaller tests use Gem::Security, add the missing  
require.
- Gem::Security used FileUtils but didn’t require it. Reported by Elia  
Schito.
- Gem::Uninstaller now respects --format-executable.

---

<div class="post-metadata">

**Author:** ![miracleofmagick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Post date:** [March 10, 2011, 5:52pm UTC](https://www.ruby-forum.com/t/rubygems-update-1-6-0-released/203929/2 "2011-03-10T17:52:40Z")

</div>

Can anyone suggest where I should put

require ‘thread’

in my application?

I have tried environment.rb but this does not seem to have the desired  
effect…

---

<div class="post-metadata">

**Author:** ![miracleofmagick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Post date:** [March 15, 2011, 1:41am UTC](https://www.ruby-forum.com/t/rubygems-update-1-6-0-released/203929/3 "2011-03-15T01:41:21Z")

</div>

Put it in config/boot.rb and it works 🙂

---

<div class="post-metadata">

**Author:** ![miracleofmagick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Post date:** [March 21, 2011, 10:29pm UTC](https://www.ruby-forum.com/t/rubygems-update-1-6-0-released/203929/4 "2011-03-21T22:29:57Z")

</div>

On Mar 21, 2011, at 6:54 AM, Roger P. wrote:

> 1. use marshal instead of yaml for the specs (this helps jruby boot more  
> quickly since yaml is a heavier dependency on that VM).

The on-disk gemspecs are not in yaml format, they’re in ruby format.

> 1. combine all the gemspec files into one “cached” gemspec file, per gem  
> directory.

I haven’t been willing to sacrifice the simplicity for doing something  
better in this area, there are many other places in RubyGems that need  
to be improved. Feel free to take a crack at it, though.

> 1. also cache somehow a list of each “requireable” file within each gem  
> (for instance, within the file for 2). Then for  
> Gem.searcher.find\_in\_unresolved you just iterate over that list instead  
> of actually hitting the file system.

I tried this once before and found it to be significantly slower than  
Dir[]. I believe I was working on OS X at the time.

Note: RubyGems no longer places bin/ from gems with executables on  
$LOAD\_PATH anymore, so the amount of globs required has been cut in (up  
to) half.

> The combination of these makes for lightning fast rubygems in windows,  
> though I’m not sure which one has most effect.

Benchmarks would be required, of course.

---

<div class="post-metadata">

**Author:** ![miracleofmagick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Post date:** [March 21, 2011, 2:54pm UTC](https://www.ruby-forum.com/t/rubygems-update-1-6-0-released/203929/5 "2011-03-21T14:54:54Z")

</div>

> 2 Major Enhancements:

Cool thanks for the release.

If you ever get the time for it, the following are a couple ideas that  
might help speed up rubygems on windows. I had some success with them  
with my faster\_rubygems project, but haven’t kept up with the latest  
updates. Some of these may already be included in rubygems I don’t  
know…

1. use marshal instead of yaml for the specs (this helps jruby boot more  
quickly since yaml is a heavier dependency on that VM).
2. combine all the gemspec files into one “cached” gemspec file, per gem  
directory.
3. also cache somehow a list of each “requireable” file within each gem  
(for instance, within the file for 2). Then for  
Gem.searcher.find\_in\_unresolved you just iterate over that list instead  
of actually hitting the file system.

The combination of these makes for lightning fast rubygems in windows,  
though I’m not sure which one has most effect.

Anyway thanks for your work on this.  
-roger

---

<div class="post-metadata">

**Author:** ![miracleofmagick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Post date:** [April 15, 2011, 6:48am UTC](https://www.ruby-forum.com/t/rubygems-update-1-6-0-released/203929/6 "2011-04-15T06:48:34Z")

</div>

> > 1. combine all the gemspec files into one “cached” gemspec file, per gem  
> > directory.
> 
> I haven’t been willing to sacrifice the simplicity for doing something  
> better in this area, there are many other places in RubyGems that need  
> to be improved. Feel free to take a crack at it, though.

Yeah with some benchmarking this doesn’t seem to be the general problem,  
either.

> > 1. also cache somehow a list of each “requireable” file within each gem  
> > (for instance, within the file for 2). Then for  
> > Gem.searcher.find\_in\_unresolved you just iterate over that list instead  
> > of actually hitting the file system.
> 
> I tried this once before and found it to be significantly slower than  
> Dir[]. I believe I was working on OS X at the time.  
> Benchmarks would be required, of course.

Interesting. On my box loading RB itself takes in full about 0.5s  
(which is non awful),

Here’s a ruby-prof of a script that requires rubygems and a few gems  
(1.9.2 windows 7):

Total: 2.410000

%self total self wait child calls name  
83.78 2.12 2.02 0.00 1.89 106  
Kernel#gem\_original\_require  
2.57 0.15 0.06 0.00 0.08 171 Kernel#eval  
2.32 0.06 0.06 0.00 0.00 102 Class::IO#read

so the bottleneck currently appears to be in the require call itself  
(though RG adds about 0.3s that might not be a big problem), and not in  
the Gem.searcher.

So the question is how to speed up those calls themselves, I suppose  
(since 2s to load like 3 gems causes us windows users some grief).

I’m not entirely sure if it’s file stat’s that slow it down or the  
parsing is slow because it has to look for an encoding string at the top  
(I can’t imagine that’s it, but…)  
My guess is it’s the file stats.

As a sidenote, if I include the faster\_require gem (which caches the  
location of requires to load them directly the second or third time the  
script is run)  
those 2.02 seconds go down to about 0.4,  
which I assume is “about as fast as it can ever get” (since it’s no  
longer doing any extra file stat’s, and also skips looking for encoding  
strings).

faster\_require by default does  
eval(File.read(previously\_cached\_require\_location))

If I have faster\_require use  
load(previously\_cached\_require\_location)  
instead, you’d think lightning fast, since it avoids lots of file stats,  
but it takes 1.7s–almost as long as normal gem\_original\_require does,  
so I’m not sure if I have a handle on where the real bottleneck is.

Thoughts?  
-roger
