[ANN] RubyGems 0.8.5

J

Jim Weirich

= Announce: RubyGems Release 0.8.5

Hello one and all. It is time for another RubyGems update. But first the
numbers.

Counting both the tarfile/zipfile download and the rubygem-update gem, we have
exceed 20,000 downloads of the RubyGems software, and this doesn't count the
number of RubyGems packages were downloaded as part of the Windows one-click
installer. New gems are being published all the time. It was just a week or
so ago when we saw the 200th gem released, and already we have more 213
unique gems available for download.

We have just released RubyGems 0.8.5. This latest version of RubyGems has
some new functionality, fixes a few bugs and makes some things look prettier.
There are more changes in the works, but we wanted to get the new stuff out
as fast as possible.

== Faster Source Cache

Do you know how you used to dread getting the following message while
installing gems?

Updating Gem source index for: http://gems.rubyforge.org

It could take up to 30 seconds (on my machine, even worse on others) for that
crazy source index to update.

This latest release of RubyGems speeds that wait time up considerably. The
following table gives the following times for installing RedCloth with a
required source index update on three system we had available to us. No RDoc
generation was included in the following times.

RubyGems Linux Mac OSX Windows
0.8.4 33 secs 73 secs 58 secs
0.8.5 8 secs 14 secs 21 secs

The new caching code is at least 3x faster than previous versions. Woo Hoo!

== What is RubyGems?

RubyGems is a package management system for Ruby applications and libraries.
RubyGems one command download makes installing Ruby software fun and
enjoyable again. (Ok, not really.)

Many gems are available for download from the RubyForge site. Browse the list
of gems with a "gem list --remote" command and download what you need with a
simple "gem install <name-of-gem>". RubyGems takes care of the details of
installing, not only the gem you requested, but also any gems needed by the
software you selected.

So now you are asking ...

== How can I get all this great stuff?

Well, here's how ...

To download and install:

1. DOWNLOAD FROM: http://rubyforge.org/frs/?group_id=126
2. UNPACK INTO A DIRECTORY AND CD THERE
3. INSTALL WITH: ruby setup.rb all (you may need admin/root privilege)

... or, if you have an existing RubyGem installation ....

$ gem install rubygems-update (again, might need to be admin/root)
$ update_rubygems (... here too)

== So What's Changed in this Release?

* Fixed a bug where, during installation, partial matches on gem names
overshadowed an exact match on the gem name. Exact matches are now required.

* Applied Austin Ziegler/Kasper Schiess's patch to fix unit test running bug.

* Applied Lyle Johnson's patch to fix a problem with multiple require paths.

* "gem update" now accepts a list of gems and only updates the gems listed on
the command line. If no list is given then all gems are updated (which is
the bahvior of the previousversion.

* gem_server has been updated with a very nice looking template. Thanks to
Martin Ankerl.

* RubyGems now actively requires Ruby version 1.8.0 or better. Folks trying
to run RubyGems on OSX with the default Ruby installation will now get a
meaning error message (rather than mysteriously not working).

* Local source index caching is now /much/ faster. It now using Marshal
rather than Yaml.

* The update command now supports a --system option to update the RubyGems
software its self. After installing 0.8.5, updating RubyGems will be a one
step process.

* Dropped that really irritating warning about generating RDocs for packages
that didn't specify it had an RDoc. No one really cared about the message
and it was confusing to new users.

* Errors encountered while using require now corrctly reported.

* Misc. bug fixes. See the ChangeLog file for details.

== Thanks

I wish to give a special thanks to Lyle Johnson, Austing Ziegler, and Ksaper
Schiess for the patches they provided. And a big thanks to Martin Ankerl for
the HTML template upgrade to the gem_server package. It looks really great.

Keep those gems coming!

-- Jim & Chad (for the RubyGems team)
 
J

James Britt

Jim said:
= Announce: RubyGems Release 0.8.5 ...

== So What's Changed in this Release?
...
* "gem update" now accepts a list of gems and only updates the gems listed on
the command line. If no list is given then all gems are updated (which is
the bahvior of the previousversion.

Sweet. Thanks.

James
 
C

Chad Fowler

BTW, is this guide up-to-date?

http://rubygems.rubyforge.org/wiki/wiki.pl?DeveloperGuide

Is there a better "How to build a gem" guide one available online?

The RubyGems chapter of the Pickaxe2 is probably the best online guide
available right now. Jim has started a new documentation project
which will hopefully yield some nicer-than-wiki results. Stay tuned.

--

Chad Fowler
http://chadfowler.com
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over 100,000 gems served!)
 
M

Marcel Molina Jr.

== Faster Source Cache

The new caching code is at least 3x faster than previous versions. Woo Hoo!

Usually I'm not one to split hairs about speed differences but this is very
welcome.

Thanks.

marcel
 
M

Marcel Molina Jr.

Marcel, are you saying that based on the numbers Jim published or your
actual experience? I'm hoping to hear confirmation that it _feels_
faster for people. It definitely did for us!

I've experienced this in person. A substantial difference. I don't dread
running 'gem list -r' anymore (emoticon).

marcel
 
J

Jim Freeze

* Jim Weirich said:
= Announce: RubyGems Release 0.8.5

Thanks for the nice update.
== So What's Changed in this Release?

* "gem update" now accepts a list of gems and only updates the gems listed on
the command line. If no list is given then all gems are updated (which is
the bahvior of the previousversion.

Now that I can update gems one at a time, it would be nice if I
could look at dependencies. For example, I would like to see
something like:

gem depends_on builder
rails-x.y

gem dependencies_of rails
Dependencies for rails x.y.z
- actionmailer-x.y
- actionpack-x.y
- builder-x.y
- rake-x.y
- ...

Can I do something like this now?
 
C

Chad Fowler

Thanks for the nice update.


Now that I can update gems one at a time, it would be nice if I
could look at dependencies. For example, I would like to see
something like:

gem depends_on builder
rails-x.y

gem dependencies_of rails
Dependencies for rails x.y.z
- actionmailer-x.y
- actionpack-x.y
- builder-x.y
- rake-x.y
- ...

Can I do something like this now?

irb(main):026:0> Gem.cache.to_a.select {|g|
!g.last.dependencies.select{|d| d.name == "rake"}.empty?}.collect{|g|
g.first}
=> ["rails-0.9.4", "rails-0.9.5", "rails-0.10.0"]

In short, no :)

Probably a good one for the TODO list, though.

--

Chad Fowler
http://chadfowler.com
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over 100,000 gems served!)
 
C

Chad Fowler

= Announce: RubyGems Release 0.8.5

Hello one and all. It is time for another RubyGems update.

When it rains, it pours!

Actually, Jim noticed a small but potentially very inconvenient bug in
my shebang-line logic (Ryan, your feature request is in, by the way).
Hopefully Jim caught it before any of you had to.

So, we've just released RubyGems 0.8.6. This is a great chance for
RubyGems 0.8.5 users to try the (new in 0.8.5) feature:

$ gem update --system

This should automatically download and install the upgrade.

Users of 0.8.4 can do the ole faithful:

$ gem install rubygems-update
$ update_rubygems


And, of course, for those of you new to RubyGems, there's always the
RubyGems file release area:

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

...from which you can download a .zip or .tar.gz file and install using:

$ ruby setup.rb


Thanks!

--

Chad Fowler
http://chadfowler.com
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over 100,000 gems served!)
 
J

Jean-Denis Vauguet

Chad said:
When it rains, it pours!

Actually, Jim noticed a small but potentially very inconvenient bug in
my shebang-line logic (Ryan, your feature request is in, by the way).
Hopefully Jim caught it before any of you had to.

So, we've just released RubyGems 0.8.6. This is a great chance for
RubyGems 0.8.5 users to try the (new in 0.8.5) feature:

$ gem update --system
Indeed it workds and it is great :)

$ sudo gem update --system
(...)
Upgrading RubyGems...
Updating Gem source index for: http://gems.rubyforge.org
Attempting remote upgrade of rubygems-update
Attempting remote installation of 'rubygems-update'
Successfully installed rubygems-update, version 0.8.6
Installing RDoc documentation for rubygems-update-0.8.6...
Updating version of RubyGems
Installing RubyGems 0.8.6
(...)
Successfully built RubyGem
Name: sources
Version: 0.0.1
File: sources-0.0.1.gem
All gems up to date

jd
 
J

Jim Weirich

Now that I can update gems one at a time, it would be nice if I
could look at dependencies. For example, I would like to see
something like: [...]
gem dependencies_of rails
Dependencies for rails x.y.z
- actionmailer-x.y
- actionpack-x.y
- builder-x.y
- rake-x.y
- ...

You can dump the gemspec and see the dependencies ... but it's not pretty...

gem spec rails
[lots of yaml output follows]

And there is no standard way of doing reverse dependencies.

Actually, Chad and I were chatting about how we don't like the way gems
handles reverse dependencies during an uninstall. If we update that logic, it
would be a good time to expose it to the user some way.

Thanks for the suggestion.
 
S

Shashank Date

Hi,

Chad said:
$ gem update --system

Cool ! Worked like a charm :)
This should automatically download and install the upgrade.

On Windows platform, where should I create the .gemrc file so that it is
seen by gem. I created one in my %HOMEPATH% but it keeps saying:

C:\>gem -v
Config file /.gemrc does not exist
0.8.6

C:\>

TIA,
-- shanko
 
C

Chad Fowler

Hi,



Cool ! Worked like a charm :)


On Windows platform, where should I create the .gemrc file so that it is
seen by gem. I created one in my %HOMEPATH% but it keeps saying:

C:\>gem -v
Config file /.gemrc does not exist
0.8.6

C:\>

Good question. I'll make a note to try it tomorrow on my Windows
machine. None handy at the moment, I'm afraid. I'm guessing that it
works _somehow_, because Gavin Sinclair wrote that code and he uses
Windows.

I believe it uses %HOME%, and not %HOMEPATH%. What would that be set
to on Windows? it might just be C:\.gemrc in this case.

--

Chad Fowler
http://chadfowler.com
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over 100,000 gems served!)
 
S

Shashank Date

Chad said:
I believe it uses %HOME%, and not %HOMEPATH%. What would that be set
to on Windows?

I have HOMEPATH and HOMEDRIVE but not HOME.
it might just be C:\.gemrc in this case.

Yes, that worked !

I would prefer it to be in %HOMEPATH%, though so that every
user of the machine could have their own copy. This is not
an issue on my home PC but will be at work.

Thanks,
-- shanko
 
J

Jim Weirich

I have HOMEPATH and HOMEDRIVE but not HOME.


Yes, that worked !

I would prefer it to be in %HOMEPATH%, though so that every
user of the machine could have their own copy. This is not
an issue on my home PC but will be at work.

RubyGems checks for the following environment variables in searching for a
home directory:

ENV['HOME']
ENV['USERPROFILE']
ENV['HOMEDRIVE']:ENV['HOMEPATH']

If none the above are defined, it tries to expand "~". If that fails, it
defaults to "C:/" on windows and "/" otherwise.

I'm not sure why it is not picking it up your situation. Hmmmm.
 
S

Shashank Date

Hi,

Jim said:
RubyGems checks for the following environment variables in searching for a
home directory:

ENV['HOME']
ENV['USERPROFILE']
ENV['HOMEDRIVE']:ENV['HOMEPATH']

If none the above are defined, it tries to expand "~". If that fails, it
defaults to "C:/" on windows and "/" otherwise.

I get the same result even though ENV['USERPROFILE'] and
ENV['HOMEDRIVE']+ENV['HOMEPATH'] are defined and have the same value.
I'm not sure why it is not picking it up your situation. Hmmmm.

Thanks for your attention,
-- shanko
 
J

Jim Weirich

Hi,

Jim said:
RubyGems checks for the following environment variables in searching for
a home directory:

ENV['HOME']
ENV['USERPROFILE']
ENV['HOMEDRIVE']:ENV['HOMEPATH']

If none the above are defined, it tries to expand "~". If that fails, it
defaults to "C:/" on windows and "/" otherwise.

I get the same result even though ENV['USERPROFILE'] and
ENV['HOMEDRIVE']+ENV['HOMEPATH'] are defined and have the same value.

Hmmmm ... I double checked the code again. It seems that we very carefully
check all the environment variables I mention above when we look for a
location to put the source index cache, but not when we look for the .gemrc
file.

I've fixed this in CVS.

In the mean time, you can set HOME if you want your .gemrc file in a location
other than c:\.
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top