RubyGems 1.5

drbrain | Tue, 01 Feb 2011 01:34:08 GMT

Posted in ,

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: 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

1.5.0 / 2011-01-31

Major Enhancements:

  • Finally fixed all known 1.9.x issues. Upgrading is now possible!

  • Merged huge 1.3.7/ruby-core changes to master.

Minor Enhancements:

  • Added UPGRADING.rdoc to help deal with 1.9 issues.

  • Gem::Format now gives better errors for corrupt gem files and includes paths

  • Pre-install hooks can now abort gem installation by returning false

  • Move shareable TestCase classes to lib/ to help plugin authors with tests.

  • Add post-build hooks that can cancel the gem install

  • Always require custom_require now that require_gem is gone

  • Added GemInstaller accessors for @options so plugins can reference them.

  • Optimized Gem.find_files. ~10% faster than 1.4.2. ~40% faster than ruby 1.9.

  • Gem::SilentUI now behaves like Gem::StreamUI for asking questions. Patch by Erik Hollensbe.

Bug Fixes:

  • `gem update` was implicitly doing –system.

  • 1.9.3: Fixed encoding errors causing gem installs to die during rdoc phase.

  • Add RubyForge URL to README. Closes #28825

  • 1.9.3: Use chdir {} when building extensions to prevent warnings. Fixes #4337

  • 1.9.2: Fix circular require warning.

  • Make requiring openssl even lazier at request of NaHi

  • `gem unpack` will now download the gem if it is not in the cache. Patch by Erik Hollensbe.

  • rubygems-update lists its development dependencies again

comments

Comments RSS FEED

Bundler under Rubygems 1.5 throws the following error:

/gems/bundler-1.0.9/lib/bundler/ui.rb:56:in `’: uninitialized constant Gem::SilentUI (NameError)

Needs a patch-y, yo!

Ted said 9 minutes later

Two hours of warning is not even close to enough time for the Bundler patch+release cycle. :(

Andre Arko said about 2 hours later

Broke my Bundler!

/Users/kevin/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.9/lib/bundler/ui.rb:56:in `’: uninitialized constant Gem::SilentUI (NameError)

Kevin Sylvestre said about 4 hours later

Broke Bundler. How do I downgrade?

Nick said about 5 hours later

@Nick: https://github.com/rubygems/rubygems/blob/master/UPGRADING.rdoc explains how to downgrade.

Bruno Michel said about 8 hours later

I solved this by installing older version of rubygems
rvm install rubygems 1.3.7

chandan said about 8 hours later

Thanks!

Nick said about 9 hours later

Too bad it doesn’t work:

➔ rvm install rubygems 1.3.7
Cannot switch to 1.3.7 for this interpreter.

Nick said about 9 hours later

All I can say is this on Win 7:

Microsoft Windows [Version 6.1.7600]
Copyright © 2009 Microsoft Corporation. All rights reserved.
The system cannot find the path specified.

C:\Windows\system32>gem update —system
Updating RubyGems
Updating RubyGems to 1.5.0
Installing RubyGems 1.5.0
RubyGems 1.5.0 installed
ERROR: While executing gem … (Encoding::UndefinedConversionError)
U+2018 from UTF-8 to CP852

C:\Windows\system32>gem install rubygems-update
Successfully installed rubygems-update-1.5.0
1 gem installed
Installing ri documentation for rubygems-update-1.5.0…
Installing RDoc documentation for rubygems-update-1.5.0…

C:\Windows\system32>update_rubygems
RubyGems 1.5.0 installed
ERROR: While executing gem … (Encoding::UndefinedConversionError)
U+2018 from UTF-8 to CP852

C:\Windows\system32>

Hoornet said about 9 hours later

Works with the brandnew bundler 1.0.10: gem install bundler

Nick said about 14 hours later

Looks like with rails 2.3.5 it’s broken

i got that:
undefined local variable or method `version_requirements’ for #

ruby -v => ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux], MBARI 0×6770, Ruby Enterprise Edition 2010.01

ruby -e ‘puts $:’ =>
/usr/local/lib/ruby/site_ruby/1.8
/usr/local/lib/ruby/site_ruby/1.8/x86_64-linux
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/vendor_ruby/1.8
/usr/local/lib/ruby/vendor_ruby/1.8/x86_64-linux
/usr/local/lib/ruby/vendor_ruby
/usr/local/lib/ruby/1.8
/usr/local/lib/ruby/1.8/x86_64-linux

uname -a
=> Linux … 2.6.32-24-server #43-Ubuntu SMP Thu Sep 16 16:05:42 UTC 2010 x86_64 GNU/Linux

Yann Marquet said about 17 hours later

reinstalling 1.4.2 solved the problem

Yann Marquet said about 17 hours later

fixed problem in last version bundler

mikhailaleksandrovi4 said about 18 hours later

bundler was warned of this change two months ago but chose to reject it, and had one patch applied since the 19th. I’m sorry that wasn’t enough warning.

bundler 1.0.10 is out now, please upgrade.

Eric Hodel said about 20 hours later

Hoornet, upgrading to the latest RDoc will remove the error. RubyGems is fully installed and will work, but you will not have documentation built.

Eric Hodel said about 21 hours later

Yann Marquet, hasn’t RubyGems been warning about version_requirements going away for quite a while now?

Eric Hodel said about 21 hours later

My advice…

Don’t upgrade! Chances are your gems are not ready for this upgrade and downgrading will be painful.

Ed said about 22 hours later

Ed, where does this advice come from? You don’t back it up with any specific claims.

Downgrading is simple and easy, it’s described in the upgrading documentation.

Eric Hodel said about 22 hours later

RubyGems 1.5.0 seems to force use of the psych yaml parser if you have it in your system. If you are having trouble parsing some yaml files, or if you have yaml files which use merge keys ( http://redmine.ruby-lang.org/issues/show/4300 ), then you might need to revert to using syck instead of psych.

I have libyaml installed, rvm builds 1.9.2 with libyaml, so its part of my system. But ruby 1.9.2 doesn’t make it the default yet. All worked fine till 1.5.0, which by directly requiring ‘psych’ cause it to get loaded first and set as system yaml parser.

My workaround was to do the following early in the rails boot sequence:

require ‘yaml’
YAML::ENGINE.yamler= ‘syck’

Matt Conway said about 24 hours later

Hello,

I’m a newbie, but I’ve been breaking my teeth on trying to get require to work. I’ve downloaded stable release of ruby 1.9.2, and installed rubygems 1.5.0. I did as root on rh linux ruby setup.rb and got "RubyGems installed the following executables:
/usr/local/bin/gem
"

Then I tried something simple:

#!/usr/local/bin/ruby

  1. Module define in trig.rb file

module Trig
PI = 3.14159
def Trig.sin(s)

  1. ..
    end
    def Trig.cos(x)
  2. ..
    end
    end

and ran

#!/usr/local/bin/ruby

  1. Module define in trig.rb file

module Trig
PI = 3.14159
def Trig.sin(s)

  1. ..
    end
    def Trig.cos(x)
  2. ..
    end
    end

and got: ruby example.rb
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:29:in `require’: cannot load such file — trig.rb (LoadError)
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:29:in `require’
from example.rb:1:in `’

I get this same error if I try require from irb prompt.

Sorry this might not be the place for this newbie question, but nothing in any of the distros, readmes, forums talks/identifies what is going on or what is needed.

Thanks, Robert

robert said 1 day later

I found the downgrade docs to be almost complete.

update_rubygems attempted to update to the most recently installed version. The downgrade steps that worked for me were:

gem install rubygems-update -v 1.3.7
gem uninstall rubygems-update -v 1.5.0
update_rubygems

Galen Krumel said 1 day later

Robert, you should go to the #ruby-lang IRC channel on Freenode or send a message to the mailing list.

Eric Hodel said 2 days later

Galen, it looks like you missed the last sentence Do make sure that you don’t have any other versions of rubygems-update installed when you run the second command.

Eric Hodel said 2 days later

Upgrading to rubygems-1.5.0 tonight caused the latest Passenger/REE to barf with the following error:

undefined method `load_yaml’ for Gem:Module

Could I suggest stopping 1.5.0 from being installed by “gem update —system”.

At least seek user confirmation that they are aware 1.5.0 may break their app.

- Mike

Mike Bailey said 6 days later

Mike, you probably forgot to restart passenger after updating RubyGems. Passenger loads part of RubyGems before forking then part of it after forking so a restart is required.

The same issue was reported to help.rubygems.org:

http://help.rubygems.org/discussions/problems/481-cant-update-to-15-on-debian-lenny

Eric Hodel said 6 days later

OK, so from what I can tell it ISN’T safe to upgrade if you have 1.9.2 right? There are way too many chances for it to break something and it’s really hard to figure out what and there are all sorts of dependencies that haven’t been updated to work.

Am I reading this right?

Mitur Binesderti said 8 days later

Hi,
I updated to rubygems 1.5.0 and also upgraded bundler to 1.0.10.

Unfortunately Autotest has broken and gives me
the following error:
uninitialized constant Gem::SilentUI (NameError)

I also noticed the if I ask for Gem list….I still get Bundler 1.0.0 in the list.

Any suggestions as to how to resolve this…thanks.

To, said 9 days later

Hi,

I upgraded my Rubygems to 1.5 and started getting a “undefined local variable or method `version_requirements’” error.

So I downgraded to my earlier RubyGems version 1.4.2, and now I get a “Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Usr # requirement” error

Any ideas on how I can get rid of this warning?

Thanks,
Aloke

Aloke Nath said 9 days later

Mitur, no, it is perfectly safe to upgrade RubyGems on 1.9.2 per the first major enhancement in the change log.

Eric Hodel said 9 days later

To, autotest doesn’t use Gem::SilentUI, the problem is somewhere else. Maybe you haven’t upgrade bundler properly.

Eric Hodel said 9 days later

Aloke, RubyGems itself does not call #version_requirements.

This warning has been printing since RubyGems 1.3.6 nearly one year ago was released and should have been fixed over that time. You need to upgrade your software calling #version_requirements and file a bug if that does not fix it.

Eric Hodel said 9 days later

Eric, a lot of us are maintaining old rails 2.3.5 installs. Rubygems breaking old working rails installs is not good. It is unlikely that Rails 2.3.5 will fix this, and it is not easy to upgrade an old rails application away from that version.

Anshul said 10 days later

Anshul, the warning existed for 20 days short of one year and had a clearly defined end of life. It will not be reverted. Either upgrade to a newer version of Rails or downgrade to RubyGems to 1.3.7.

If you wish for a rails release to address this issue you will need to take that up on the rails bug tracker.

Eric Hodel said 10 days later

Anshul, you can monkey-patch line 27 of rails/lib/tasks/framework.rake to workaround this. I hardcoded “2.3.11” to freeze Rails, fwiw.

Scott Willson said 10 days later

Comments are disabled