RubyGems 1.1.0 on Apple Ruby
Eric Hodel | Sun, 30 Mar 2008 03:04:14 GMT
There is a bug on updating RubyGems to 1.1.0 on Apple’s Ruby. The workaround is to run:
sudo gem install rubygems-update sudo update_rubygems
RubyGems 1.1.0
Eric Hodel | Sat, 29 Mar 2008 08:41:00 GMT
Announce: RubyGems Release 1.1.0
Release 1.1.0 adds some new features and fixes some bugs.
New features:
- RubyGems now uses persistent connections on index updates. Index updates are much faster now.
- RubyGems only updates from a latest index by default, cutting candidate
gems for updates to roughly 1/4 (at present). Index updates are even faster
still.
- gem list -r may only show the latest version of a gem, add --all to see all gems.
- gem spec now extracts specifications from .gem files.
- gem query --installed to aid automation of checking for gems.
Bugs Fixed:
- RubyGems works with both Config and RbConfig now.
- Executables are now cleaned upon uninstall.
- You can now uninstall from a particular directory.
- Updating from non-default sources fixed.
- Executable stubs now use ruby install name in shebang.
- gem unpack checks every directory in Gem.path now.
- gem install now exits with non-zero exit code when appropriate.
- gem update only updates gems that need updates.
- gem update doesn't force remote-only updates.
- gem update handles dependencies properly when updating.
- Gems are now loaded in Gem.path order.
- Gem stub scripts on windows now work outside Gem.bindir.
- gem sources -r now works without network access.
Other Changes Include:
- RubyGems now requires Ruby > 1.8.3.
- Release notes are now printed upon installation.
- gem env path now prints a usable path.
- gem install reverts to local-only installation upon network error.
- Tar handling code refactoring and cleanup.
- Gem::DependencyInstaller's API has changed.
For a full list of changes to RubyGems, see the ChangeLog file.
How can I get RubyGems?
NOTE: If you have installed RubyGems using a package system you may want to install a new RubyGems through the same packaging system.
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)
(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)
If you don't have any gems install, there is still the pre-gem approach to getting software … doing it manually:
- DOWNLOAD FROM: rubyforge.org/frs/?group_id=126
- UNPACK INTO A DIRECTORY AND CD THERE
- INSTALL WITH: ruby setup.rb (you may need admin/root privilege)
To File Bugs
The RubyGems bug tracker can be found on RubyForge at: 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.
Thanks
Keep those gems coming!
— Jim & Chad & Eric (for the RubyGems team)
.au Sprint
Eric Hodel | Tue, 11 Mar 2008 09:16:16 GMT
I spent Saturday and Sunday at the Sydney Rubinius sprint, and it was quite productive. Not only were local beers sampled, but we also got some good work done.
Lincoln Stoll helped me shake the last bugs out of RubyGems, so we integrated it into Rubinius. We decided to make it a subcommand rbx gem like rbx compile or rbx describe. There are still a few things broken in RubyGems, namely installing gems with extensions because mkmf.rb doesn’t work in Rubinius.
Lincoln also pointed out and gave me patches for a few backwards-compatibility problems with RDoc, so now both RubyGems and RDoc work on Rubinius.
Upon my return next week I’ll be cooking up a release of RubyGems with a handful of bug fixes and persistent connection support for RubyGems’ HTTP fetching which will make those incremental updates quite a bit faster.
RubyGems on Rubinius
Eric Hodel | Sun, 13 Jan 2008 06:36:00 GMT
Friday I passed an important milestone for RubyGems on Rubinius, test/test_gem.rb ran to completion! Here are the dots to prove it:
$ ~/Links/RUBINIUS/shotgun/rubinius -Ilib:test test/test_gem.rb Loaded suite test/test_gem Started ................................. Finished in 18.667198 seconds. 33 tests, 56 assertions, 0 failures, 0 errors
These tests include building, installing, and activating a Gem, so it should be possible now to use RubyGems in Rubinius. Unfortunately, the `gem` command doesn't work yet. That will be among my next tasks.
The final holdup for these RubyGems tests was a Dir.glob that handled {}. Finishing this off should also allow rake to work, according Evan's recent work on rake.
A full run of all RubyGems tests reports:
100 tests, 221 assertions, 6 failures, 13 errors
A full run with MRI is 533 tests, 1816 assertions. The 433 missing tests are due to a missing feature of Module#module_function in Rubinius that prevents the remaining test files from loading.
If you'd like to duplicate my results, here's how:
- Checkout Rubinius
- Build Rubinius by running rake
- Checkout RubyGems' trunk
- Run /path/to/rubinius/shotgun/rubinius -Ilib:test test/test_gem.rb
My Favorite gem Commands
Eric Hodel | Mon, 24 Dec 2007 03:14:00 GMT
My two favorite gem commands are gem install -i ~/tmp/gems and gem which, followed closely by the gem fetch gemname; gem unpack gemname combo.
Now that the install command automatically installs all the necessary dependencies into the installation directory, it's easy to pull down a gem and play with it without having to do the work of cleaning out all it's dependencies from your main repository. A simple rm -r ~/tmp/gems is all it takes to clean up.
While I seldom have a need to use it, gem which tells you which file would get loaded when you require something. For example:
$ gem list activerecord *** LOCAL GEMS *** activerecord (1.15.6, 1.15.3) $ gem which active_record (checking gem activerecord-1.15.6 for active_record) /System/Library/Frameworks/[...]/gems/activerecord-1.15.6/lib/active_record.rb
Finally, if I just want to poke at some code from a gem without bothering to poke through a gem repository, you can use gem fetch gemname; gem unpack gemname and you'll have a gemname-version directory with the gem sitting right in front of you.
RubyGems 1.0.1
Eric Hodel | Fri, 21 Dec 2007 03:25:37 GMT
Release 1.0.1 fixes a few bugs.
Bugs Fixed:
- Installation on Ruby 1.8.3 through 1.8.5 fixed
- gem build on 1.8.3 fixed
Other Changes Include:
- Since RubyGems 0.9.5, RubyGems is no longer supported on Ruby 1.8.2 or older, this is official in RubyGems 1.0.1.
How can I get RubyGems?
NOTE: If you have installed RubyGems using a package you may want to install a new RubyGems through the same packaging system.
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)
(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)
If you don’t have any gems install, there is still the pre-gem approach to getting software … doing it manually:
- DOWNLOAD FROM: http://rubyforge.org/frs/?group_id=126
- UNPACK INTO A DIRECTORY AND CD THERE
- INSTALL WITH: ruby setup.rb (you may need admin/root privilege)
To File Bugs
The RubyGems bug tracker can be found on RubyForge at: 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.
Thanks
Keep those gems coming!
—Jim & Chad & Eric (for the RubyGems team)
RubyGems 1.0.0
Eric Hodel | Thu, 20 Dec 2007 08:32:58 GMT
Release 1.0.0 fixes several bugs.
NOTE: There is a bug installing on Ruby 1.8.5 and earlier. I will fix this tomorrow.
Major New Features Include:
- RubyGems warns about various problems with gemspecs during gem building
- More-consistent versioning for the RubyGems software
Other Changes Include:
- Fixed various bugs and problems with installing gems on Windows
- Fixed using gem server for installing gems
- Various operations are even more verbose with—verbose
- Built gems are now backwards compatible with 0.9.4
- Improved detection of RUBYOPT loading rubygems
- ruby setup.rb now has a—help option
- Gem::Specification#bindir is now respected on installation
- Executable stubs can now be installed to match ruby’s name, so if ruby is installed as ‘ruby18’, foo_exec will be installed as ‘foo_exec18’
- gem unpack can now unpack into a specific directory with—target
- OpenSSL is no longer required by default
Deprecations and Deletions:
- Kernel#require_gem has been removed
- Executables without a shebang will not be wrapped in a future version, this may cause such executables to fail to operate on installation
- Gem::Platform constants other than RUBY and CURRENT have been removed
- Gem::RemoteInstaller was removed
- Gem::Specification#test_suite_file and #test_suite_file= are deprecated in favor of #test_file and #test_file=
- Gem::Specification#autorequire= has been deprecated
- Time::today will be removed in a future version
How can I get RubyGems?
NOTE: If you have installed RubyGems using a package you may want to install a new RubyGems through the same packaging system.
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)
(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)
If you don’t have any gems install, there is still the pre-gem approach to getting software … doing it manually:
- DOWNLOAD FROM: http://rubyforge.org/frs/?group_id=126
- UNPACK INTO A DIRECTORY AND CD THERE
- INSTALL WITH: ruby setup.rb (you may need admin/root privilege)
Thanks
Keep those gems coming!
RubyGems 0.9.5
Eric Hodel | Tue, 20 Nov 2007 00:35:31 GMT
RubyGems 0.9.5 adds several new features and fixes several bugs.
To upgrade to the latest RubyGems:
gem update --system
To upgrade to the latest RubyGems by hand:
- Download RubyGems from http://rubyforge.org/frs/?group_id=126&release_id=16500
- gem install rubygems-update-0.9.5.gem
- update_rubygems
To install RubyGems from scratch:
- Download RubyGems source .tgz or .zip file from http://rubyforge.org/frs/?group_id=126&release_id=16500
- Unpack the source .tgz or .zip
- ruby setup.rb
To install RubyGems on Ruby 1.9 update your ruby trunk checkout and reinstall.
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:
<samp>$ 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</samp>
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::todayis 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
- gem.bat and bin stubs on mswin platforms are improved and compatible with the One-Click Installer
- Multi-version diamond dependencies only are installed once
- Bulk index updates take less memory
- -V now enables verbose instead of -v to avoid collision with—version’s -v
- 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#platformsshould no longer be a String, useGem::Platform::CURRENTwhen 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
- Removed gem* commands are now replaced with stubs that warn
- Custom rdoc styles are now supported
- Gem indexer no longer removes quick index during index creation
Kernel#requireonly 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 Berger for win32 support and testing
- Luis Lavena for win32 support and testing
- Tom Copeland for help testing and releasing the new indexer
- Wilson Bilkovich for the new Marshal 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)
RubyGems Beta 0.9.4.6
Eric Hodel | Sat, 20 Oct 2007 08:10:12 GMT
RubyGems 0.9.4.6 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:
<samp>$ 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</samp>
Changes Since 0.9.4.5
- gem update won’t install gems multiple times (due to dependencies)
- gem.bat and bin stubs on mswin platforms are improved and compatible with the One-Click Installer
- gem install no longer installs dependencies for old versions of a gem
- Removed gem* commands are now replaced with stubs that warn
- RubyGems now installs correctly with
RUBYOPT=-rubygems<code> </ul> For the rest of the updates since RubyGems 0.9.4, see the <a href="http://blog.segment7.net/articles/2007/10/13/rubygems-beta-0-9-4-5">RubyGems Beta 0.9.4.5 release notes</a>.
RubyGems Beta 0.9.4.5
Eric Hodel | Sat, 13 Oct 2007 23:43:55 GMT
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:
<samp>$ 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</samp>
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::todayis 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#platformsshould no longer be a String, useGem::Platform::CURRENTwhen 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#requireonly 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 Berger for win32 testing of early betas
- Luis Lavena for help with win32 platforms
- Tom Copeland for help testing and releasing the new indexer
- Wilson Bilkovich 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)

Articles