Forum: Ruby RubyGems 0.9.1

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2007-01-16 23:04
(Received via mailing list)
= Announce: RubyGems Release 0.9.1

Finally, the much anticipated RubyGems version 0.9.1 is now available.
This release includes a number of new features and bug fixes.

The most important change in RubyGems 0.9.1 is that RubyGems no
longer allows files to be installed outside of the installation
directory.  A separate security bulletin with full details will be
posted shortly.

RubyGems 0.9.1 is a required update.  The RubyForge gem repository
will soon disallow installation by older versions of RubyGems.
Manual installation will still be allowed.

== Upgrade note

While require_gem was deprecated in 0.9.0, the bin stubs are still
using it (oops!).  To get rid of the warnings printed by rake or
other bin stubs simply run 'gem pristine --all'.

== Changes in RubyGems 0.9.1

Major changes include:

* RubyGems no longer allows installation of files outside the gem
directory
* #require_gem will now print a warning, use #gem instead
* RubyGems now requires ruby 1.8.2 or greater
* RubyGems is -w clean

Minor changes include:

* gem command changes
   * new gem pristine command
   * new gem outdated command
   * new gem sources command
   * gem uninstall can uninstall multiple gems
   * gem install uses the cache instead of downloading
   * gem install returns non-zero exit code on failure
   * gem install can now set shebang on bin stubs (env or ruby)
   * gem help output now fits in 80 columns
* many proxy installation improvements
* gem cert improvements
* RubyGems is now easier to use as a library
   * Easier programatic installs
   * Easier inspection of local and remote gems
* extension building enhancements
* error reporting enhancements (less odd exceptions)
* require now loads .jar files

Bug fixes:

* installing from scratch fixed
* gem install --force forces
* installing from read-only location works
* gem uninstall requires full name
* gem install obeys GEM_HOME for bin scripts
* RubyGems now installs on ruby 1.9
* fixed issue with Gem::Specification#hash for JRuby
* RubyGems now installs RDoc and ri for itself
* RubyGems is now tab-free

== 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.

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.

== RubyGems Statistics

* About 1250 different gems are available from RubyForge
* Over 540 thousand downloads of the RubyGems software
* Over 8 million gem downloads

If you are interested in finding out when new gems are released, I
maintain an RSS feed at http://onestepback.org/gemwatch.rss.

== How can I get RubyGems?

If you have a recent version of RubyGems (0.8.5 or later), then all
you need to do is:

$ gem update --system # you might need to be admin/root
$ gem pristine --all # ... here too

(Note: You may have to run the command twice if you have any previosly
installed rubygems-update gems).

If you have an older version of RubyGems installed, then you can still
do it in two steps:

$ gem install rubygems-update # again, might need to be admin/root
$ update_rubygems # ... here too
$ gem pristine --all # and here

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

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)

== What's Next

For RubyGems 0.9.2 the RubyGems team is looking to add:

* Integration of local and remote installation
* Automatic installation of platform-specific gems

== Thanks

Contributors to this release include:

Anatol Pomozov, Gavin Sinclair, David Lee, Ryan Davis, Robert James,
Chris Morris, Sylvain Joyeux, Sava Chankov, Tom Pollard, Kevin Clark,
Andy Shen.

Keep those gems coming!

-- Eric Hodel (for the RubyGems team)
88e98c5398a3b4af4d0eaefacf69f8b7?d=identicon&s=25 Parragh Szabolcs (Guest)
on 2007-01-16 23:30
(Received via mailing list)
Where do I go wrong?

$ gem -v
0.9.0

$ gem update --system
Updating RubyGems...
Attempting remote update of rubygems-update
Successfully installed rubygems-update-0.9.0
Updating version of RubyGems to 0.9.0
Installing RubyGems 0.9.0
....
....
Successfully built RubyGem
  Name: sources
  Version: 0.0.1
  File: sources-0.0.1.gem
RubyGems system software updated

$ gem -v
0.9.0

$ gem pristine --all
ERROR:  While executing gem ... (RuntimeError)
    Unknown command pristine


I even tried:

$ wget
http://rubyforge.org/frs/download.php/16451/rubyge...
$ gem install rubygems-update-0.9.1.gem
Successfully installed rubygems-update, version 0.9.1
$ gem -v
0.9.0
$ gem pristine --all
ERROR:  While executing gem ... (RuntimeError)
    Unknown command pristine
0276239ca57aee241d4b41379587fa20?d=identicon&s=25 Lyle Johnson (Guest)
on 2007-01-16 23:42
(Received via mailing list)
On 1/16/07, Parragh Szabolcs <parragh@dayka.hu> wrote:

> $ gem update --system
> Updating RubyGems...
> Attempting remote update of rubygems-update
> Successfully installed rubygems-update-0.9.0
> Updating version of RubyGems to 0.9.0
> Installing RubyGems 0.9.0
> ....

I'm seeing almost the same thing here (running Mac OS X if it
matters), but at the end I get this:

As of RubyGems 0.8.0, library stubs are no longer needed.
Searching $LOAD_PATH for stubs to optionally delete (may take a
while)...
...done.
No library stubs found.

  Successfully built RubyGem
  Name: sources
  Version: 0.0.1
  File: sources-0.0.1.gem
hook
/usr/local/lib/ruby/gems/1.8/gems/rubygems-update-0.9.0/./post-install.rb
failed:
undefined method `post_install_message' for
#<Gem::Specification:0x6f3dd0>
Try 'ruby setup.rb --help' for detailed usage.
RubyGems system software updated
Ff9e18f0699bf079f1fc91c8d4506438?d=identicon&s=25 James Britt (Guest)
on 2007-01-16 23:56
(Received via mailing list)
Lyle Johnson wrote:
> I'm seeing almost the same thing here (running Mac OS X if it
>  File: sources-0.0.1.gem
> hook
> /usr/local/lib/ruby/gems/1.8/gems/rubygems-update-0.9.0/./post-install.rb
> failed:
> undefined method `post_install_message' for #<Gem::Specification:0x6f3dd0>
> Try 'ruby setup.rb --help' for detailed usage.
> RubyGems system software updated
>
>

On Kubuntu 6.10, with ruby 1.8.5 (2006-08-25) [i686-linux]:

As of RubyGems 0.8.0, library stubs are no longer needed.
Searching $LOAD_PATH for stubs to optionally delete (may take a
while)...
...done.
No library stubs found.

   Successfully built RubyGem
   Name: sources
   Version: 0.0.1
   File: sources-0.0.1.gem
RubyGems system software updated
james@james06:~/vhosts/cloudpanel.com/nitro$ gem help pristine
WARNING:  Unknown command pristine. Try gem help commands

gem help commands does not list 'pristine'

Also, "gem --version"  gives 0.9.0


--
James Britt

"I never dispute another person's delusions, just their facts."
   - Len Bullard
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2007-01-17 00:11
(Received via mailing list)
On Jan 16, 2007, at 14:27, Parragh Szabolcs wrote:

> Installing RubyGems 0.9.0
> ....
> ....
> Successfully built RubyGem
>  Name: sources
>  Version: 0.0.1
>  File: sources-0.0.1.gem
> RubyGems system software updated

The gem indexer isn't running.  Please wait while Tom fixes.  All
gems are waiting on this since Hoe was poisoned.

> $ gem install rubygems-update-0.9.1.gem
> Successfully installed rubygems-update, version 0.9.1

You missed:

$ update_rubygems # ... here too


> $ gem -v                              0.9.0
> $ gem pristine --all                  ERROR:  While executing
> gem ... (RuntimeError)
>    Unknown command pristine

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net

I LIT YOUR GEM ON FIRE!
3bb23e7770680ea44a2d79e6d10daaed?d=identicon&s=25 M. Edward (Ed) Borasky (Guest)
on 2007-01-17 04:57
(Received via mailing list)
Parragh Szabolcs wrote:
> ....
> (RuntimeError)
> $ gem pristine --all                  ERROR:  While executing gem ...
> (RuntimeError)
>    Unknown command pristine
>
>
>
>
I got the same thing -- I think you have to run something else after you
install the rubygems-update gem. I ended up downloading the tarball from
RubyForge and installing it directly. That worked and I'm now on
RubyGems 0.9.1.

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.
672d693d2b8d408648f664b93d84e8e9?d=identicon&s=25 unknown (Guest)
on 2007-01-17 07:51
(Received via mailing list)
Eric Hodel <drbrain@segment7.net> wrote:

> If you have a recent version of RubyGems (0.8.5 or later), then all
> you need to do is:
>
> $ gem update --system # you might need to be admin/root
> $ gem pristine --all # ... here too

i had a gem version 0.9.0 and got an error while the last line :

$ sudo gem pristine --all
ERROR: While executing gem ... (RuntimeError)
    Unknown command pristine


what to do ?
5a837592409354297424994e8d62f722?d=identicon&s=25 Ryan Davis (Guest)
on 2007-01-17 08:36
(Received via mailing list)
On Jan 16, 2007, at 7:56 PM, M. Edward (Ed) Borasky wrote:

> after you install the rubygems-update gem. I ended up downloading
> the tarball from RubyForge and installing it directly. That worked
> and I'm now on RubyGems 0.9.1.

To be clear, because of rubygems poisoning indexing has been turned
off. Until gem indexing is back on, you must manually download and
install the gem updater. The basic steps are:

% wget http://rubyforge.org/frs/download.php/16451/rubygems-
update-0.9.1.gem
% sudo gem install rubygems-update-0.9.1.gem
% sudo update_rubygems
% sudo gem pristine --all

If you miss any of those steps, then things will (obviously) go
wrong. If you don't have rubygems installed, or your version is <
0.8.5, then you can't use those steps and must do a full install.
9b2ab81e2e88f44fa3f2c8a72cf79649?d=identicon&s=25 Artur Merke (Guest)
on 2007-01-17 09:46
(Received via mailing list)
Ryan Davis wrote:
> >> ...
> update-0.9.1.gem
> % sudo gem install rubygems-update-0.9.1.gem
> % sudo update_rubygems
> % sudo gem pristine --all

it doesn't work with my installation:

>gem install c:\Downloads\rubygems-update-0.9.1.gem
...
Successfully installed rubygems-update, version 0.9.1

C:\ruby\lib\ruby\gems\1.8\gems\rubygems-update-0.9.1\bin>update_rubygems
Error: Cannot find RubyGems Update Path!

RubyGems has already been updated.
The rubygems-update gem may now be uninstalled.
E.g.    gem uninstall rubygems-update

C:\ruby\lib\ruby\gems\1.8\gems\rubygems-update-0.9.1\bin>gem -v
0.9.0

here
>ruby -e "print $LOAD_PATH"
c:/ruby/lib/ruby/site_ruby/1.8c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrtc:/ruby/
lib/ruby/site_rubyc:/ruby/lib/ruby/1.8c:/ruby/lib/ruby/1.8/i386-mswin32.

should I somehow extend the settings in $LOAD_PATH?

Artur
5a837592409354297424994e8d62f722?d=identicon&s=25 Ryan Davis (Guest)
on 2007-01-17 11:25
(Received via mailing list)
On Jan 17, 2007, at 12:45 AM, Artur Merke wrote:

> Successfully installed rubygems-update, version 0.9.1
>
> C:\ruby\lib\ruby\gems\1.8\gems\rubygems-update-0.9.1
> \bin>update_rubygems
> Error: Cannot find RubyGems Update Path!
> [...]
> should I somehow extend the settings in $LOAD_PATH?

I don't use your OS, so I can't help.
97cbca14d17274370cce501bbea7980a?d=identicon&s=25 Mike Harris (gfunk911)
on 2007-01-17 15:24
(Received via mailing list)
Artur Merke wrote:

>>>>I even tried:
>>>after you install the rubygems-update gem. I ended up downloading
>>% sudo gem install rubygems-update-0.9.1.gem
>>
>
>lib/ruby/site_rubyc:/ruby/lib/ruby/1.8c:/ruby/lib/ruby/1.8/i386-mswin32.
>
>should I somehow extend the settings in $LOAD_PATH?
>
>Artur
>
>
>
>
>
Get gem from
http://rubyforge.org/frs/download.php/16451/rubyge...
gem install rubygems-update-0.9.1.gem
CLOSE COMMAND PROMPT, OPEN NEW ONE (to refresh path)
update_rubygems (now successfully updates rubygems to 0.9.1)

gem pristine --all currently errors for me

>gem pristine --all
Restoring gem(s) to pristine condition...
ERROR:  While executing gem ... (Zlib::BufError)
    buffer error


I assume it's a temporarily problem, will try last step later.
267942571862781dd912de6482a35f46?d=identicon&s=25 Kevin Williams (k-dub)
on 2007-01-17 18:38
You probably have rubygems-update-0.9.0 installed as well.

I just uninstalled all versions of rubygems-update and installed
rubygems 0.9.1 from the source, then reinstalled
rubygems-update-0.9.1.gem. After that, 'gem pristine --all' worked fine.


Artur Merke wrote:
> Ryan Davis wrote:
>> >> ...
>> update-0.9.1.gem
>> % sudo gem install rubygems-update-0.9.1.gem
>> % sudo update_rubygems
>> % sudo gem pristine --all
>
> it doesn't work with my installation:
>
>>gem install c:\Downloads\rubygems-update-0.9.1.gem
> ...
> Successfully installed rubygems-update, version 0.9.1
>
> C:\ruby\lib\ruby\gems\1.8\gems\rubygems-update-0.9.1\bin>update_rubygems
> Error: Cannot find RubyGems Update Path!
>
> RubyGems has already been updated.
> The rubygems-update gem may now be uninstalled.
> E.g.    gem uninstall rubygems-update
>
> C:\ruby\lib\ruby\gems\1.8\gems\rubygems-update-0.9.1\bin>gem -v
> 0.9.0
>
> here
>>ruby -e "print $LOAD_PATH"
> c:/ruby/lib/ruby/site_ruby/1.8c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrtc:/ruby/
> lib/ruby/site_rubyc:/ruby/lib/ruby/1.8c:/ruby/lib/ruby/1.8/i386-mswin32.
>
> should I somehow extend the settings in $LOAD_PATH?
>
> Artur
3f7fc5fbdbb40cf38d5bf94f265b343c?d=identicon&s=25 Andrew Skegg (askegg)
on 2007-01-19 03:07
Hi,

I seem to be having some trouble with thre "-p" or "--http-proxy" option
for installing/updating gems.

Mac OSX (Intel)
ruby 1.8.5 (2006-12-25 patchlevel 12) [i686-darwin8.8.1]
gem 0.9.1

*** LOCAL GEMS ***

gem_plugin (0.2.1)
    A plugin system based only on rubygems that uses dependencies only

rubygems-update (0.9.1)
    RubyGems Update GEM

sources (0.0.1)
    This package provides download sources for remote gem installation

Try to install/update gems:

gem install rails
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    No route to host - connect(2)(Errno::EHOSTUNREACH)

That's OK - I am behind a firewall & proxy, so:

gem install rails -p http://192.168.1.31:3128
ERROR:  While executing gem ... (NoMethodError)
    undefined method `[]=' for #<Gem::ConfigFile:0x1085588>

gem install rails --http-proxy http://192.168.1.31:3128
ERROR:  While executing gem ... (NoMethodError)
    undefined method `[]=' for #<Gem::ConfigFile:0x1085588>

Hmmm.....

Any ideas?
3f7fc5fbdbb40cf38d5bf94f265b343c?d=identicon&s=25 Andrew Skegg (askegg)
on 2007-01-19 03:47
Andrew Skegg wrote:
>
> Any ideas?

Should have tried on last thing before I posted:

export HTTP_PROXY = "http://proxy:3128"

This fixes the problem, but I still need to specify the "-p" switch, and
I am only behind this proxy at work which means I will be altering the
laptop all the time.
3a83969376c805ef5b6042191fdb0ff3?d=identicon&s=25 Andreas S. (andreas)
on 2007-01-19 16:15
Eric Hodel wrote:

> == What's Next
>
> For RubyGems 0.9.2 the RubyGems team is looking to add:
>
> * Integration of local and remote installation
> * Automatic installation of platform-specific gems

How about checksums to verify that the gem you get from a mirror is the
real thing?
F2bb5fccce023e9e8069acb2e85ade3f?d=identicon&s=25 Justin Sabelko (jbirdjavi)
on 2007-01-25 17:04
Andrew Skegg wrote:
> Andrew Skegg wrote:
>>
>> Any ideas?
>
> Should have tried on last thing before I posted:
>
> export HTTP_PROXY = "http://proxy:3128"
>
> This fixes the problem, but I still need to specify the "-p" switch, and
> I am only behind this proxy at work which means I will be altering the
> laptop all the time.


I'm having this issue too (running on Windows, though).  Shouldn't this
be able to work without having to set an environment variable?  That's
the point of the -p option, right?

I added the following to config_file.rb, and the proxy option works
after adding it, but somehow I'm guessing that's not what the designers
had in mind for this class...

def []=(key, value)
  @hash[key.to_s]=value
end
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2007-01-25 19:37
(Received via mailing list)
On Jan 25, 2007, at 08:04, Justin Sa wrote:
>> switch, and
> I added the following to config_file.rb, and the proxy option works
> after adding it, but somehow I'm guessing that's not what the
> designers
> had in mind for this class...
>
> def []=(key, value)
>   @hash[key.to_s]=value
> end

You added it where?  Please submit a patch.  (If you just respond to
this email with the patch its sure to get lost.)

http://rubyforge.org/tracker/?atid=577&group_id=12...

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net

I LIT YOUR GEM ON FIRE!
3f7fc5fbdbb40cf38d5bf94f265b343c?d=identicon&s=25 Andrew Skegg (askegg)
on 2007-01-25 22:55
Eric Hodel wrote:
> On Jan 25, 2007, at 08:04, Justin Sa wrote:
>>> switch, and
>> I added the following to config_file.rb, and the proxy option works
>> after adding it, but somehow I'm guessing that's not what the
>> designers
>> had in mind for this class...
>>
>> def []=(key, value)
>>   @hash[key.to_s]=value
>> end
>
> You added it where?  Please submit a patch.  (If you just respond to
> this email with the patch its sure to get lost.)
>


I can verify this fix works - at least for me :)

It seems command.rb (line 258) tries to set the configuration hash
using:

  "Gem.configuration[:http_proxy] = options[:http_proxy]"

but there is no []= method to respond, so it spits the error.
Interestingly, this is the only option that tries to set its value this
way.

Adding this is /usr/local/lib/ruby/site_ruby/1.8/rubygems/config_file.rb
(on my Mac) fixes the issue:

  def []=(key,value)
    @hash[key.to_s] = value
  end

I am probably not the best person to create a proper patch including
tests (never really done it before), but I can post this to the website
to capture it.
F2bb5fccce023e9e8069acb2e85ade3f?d=identicon&s=25 Justin Sabelko (jbirdjavi)
on 2007-01-25 23:07
Andrew Skegg wrote:
> I can verify this fix works - at least for me :)
>
> It seems command.rb (line 258) tries to set the configuration hash
> using:
>
>   "Gem.configuration[:http_proxy] = options[:http_proxy]"
>
> but there is no []= method to respond, so it spits the error.
> Interestingly, this is the only option that tries to set its value this
> way.
>
> Adding this is /usr/local/lib/ruby/site_ruby/1.8/rubygems/config_file.rb
> (on my Mac) fixes the issue:
>
>   def []=(key,value)
>     @hash[key.to_s] = value
>   end
>
> I am probably not the best person to create a proper patch including
> tests (never really done it before), but I can post this to the website
> to capture it.

I added this as a bug actually (#8152).  This fix (to quote the
Practices of an Agile Developer book) just doesn't "feel" right.  I'd
guess that where it's being called from is using it incorrectly, but not
knowing the intentions for that class, it's just a feeling.

Andrew, I added what you found to the bug description.
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2007-01-26 03:08
(Received via mailing list)
On Jan 25, 2007, at 14:07, Justin Sabelko wrote:
> I added this as a bug actually (#8152).  This fix (to quote the
> Practices of an Agile Developer book) just doesn't "feel" right.  I'd
> guess that where it's being called from is using it incorrectly,
> but not
> knowing the intentions for that class, it's just a feeling.
>
> Andrew, I added what you found to the bug description.

Thanks, that'll help me track this down for real.

--
Eric Hodel - drbrain@segment7.net - http://blog.segment7.net

I LIT YOUR GEM ON FIRE!
This topic is locked and can not be replied to.