rubypan 1.0 released
Eric Hodel | Fri, 17 Apr 2009 00:19:00 GMT
rubypan version 1.0 has been released!
A gem command plugin that adds `gem ferret` to perform fulltext searching of rubypan.org. Requires RubyGems 1.3.2+
$ gem ferret Eric Hodel action_profiler (1.0.0) ar_mailer (1.3.1) ar_mailer_generator (1.0.0) cached_model (1.3.1) firebrigade_api (1.0.0) geocoder-us (1.1.1) [...]
RubyGems 1.3.2
Eric Hodel | Wed, 15 Apr 2009 21:48:00 GMT
NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see “Nothing to update”.
Release 1.3.2 fixes some bugs and adds some features.
Select New Features:
- RubyGems now loads plugins from rubygems_plugin.rb in installed gems. This can be used to add commands (See Gem::CommandManager) or add install/uninstall hooks (See Gem::Installer and Gem::Uninstaller).
- Gem::Version now understands prerelease versions using letters. (eg. ‘1.2.1.b’) Thanks to Josh Susser, Alex Vollmer and Phil Hagelberg.
- RubyGems now includes a Rake task for creating gems which replaces rake’s Rake::GemPackageTask. See Gem::PackageTask.
- Gem::find_files now returns paths in $LOAD_PATH.
- Added Gem::promote_load_path for use with Gem::find_files
- Added Gem::bin_path to make finding executables easier. Patch #24114 by James Tucker.
- Various improvements to build arguments for installing gems.
- `gem contents` added --all and --no-prefix.
- Gem::Specification
- #validate strips directories and errors on not-files.
- #description no longer removes newlines.
- #name must be a String.
- FIXME and TODO are no longer allowed in various fields.
- Added support for a license attribute. Feature #11041 (partial).
- Removed Gem::Specification::list, too much process growth. Bug #23668 by Steve Purcell.
- `gem generate_index`
- Can now generate an RSS feed.
- Modern indicies can now be updated incrementally.
- Legacy indicies can be updated separately from modern.
Select Bugs Fixed:
- Better gem activation error message. Patch #23082.
- Kernel methods are now private. Patch #20801 by James M. Lawrence.
- Fixed various usability issues with `gem check`.
- `gem update` now rescues InstallError and continues. Bug #19268 by Gabriel Wilkins.
- Allow ‘https’, ‘file’ as a valid schemes for --source. Patch #22485.
- `gem install`
- Now removes existing path before installing. Bug #22837.
- Uses Gem::bin_path in executable stubs to work around Kernel#load bug in 1.9.
- Correctly handle build args (after --) via the API. Bug #23210.
- --user-install
- `gem install --no-user-install` now works. Patch #23573 by Alf Mikula.
- `gem uninstall` can now uninstall from ~/.gem. Bug #23760 by Roger Pack.
- setup.rb
- Clarify RubyGems RDoc installation location. Bug #22656 by Gian Marco Gherardi.
- Allow setup to run from read-only location. Patch #21862 by Luis Herrera.
- Fixed overwriting ruby executable when BASERUBY was not set. Bug #24958 by Michael Soulier.
- Ensure we’re in a RubyGems dir when installing.
- Deal with extraneous quotation mark when autogenerating .bat file on MS Windows. Bug #22712.
Deprecation Notices:
- Gem::manage_gems has been removed.
- Time::today will be removed in RubyGems 1.4.
For a full list of changes to RubyGems and the contributor for each change, see the ChangeLog file.
Special thanks to Chad Wooley for backwards compatibility testing and Luis Lavena and Daniel Berger for continuing windows support.
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: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see “Nothing to update”.
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!
— The RubyGems team
PS: This blog post brought to you by rdoc --pipe
RubyForge Gems RSS Feed
Eric Hodel | Mon, 09 Mar 2009 21:20:35 GMT
Thanks to the assistance of Tom Copeland, RubyForge now has an RSS feed of recent gems:
http://gems.rubyforge.org/index.rss
The feed is updated daily and contains the last two days of releases. If you forget, you can also access the feed via RSS autodiscovery on http://rubyforge.org
A RubyGems + GitHub proposal
Eric Hodel | Thu, 05 Feb 2009 02:33:09 GMT
I know many people have added GitHub to their RubyGems sources list and find it sub-optimal. For example, Nokogiri is installed via gem install nokogiri from RubyForge and gem install tenderlove-nokogiri from GitHub. Furthermore, it’s possible to create a username/gem name combo on GitHub that overlaps a RubyForge name which could lead to pain and suffering for GitHub users.
I’ve come up with a potential solution to this problem:
- Add an alias name attribute to gem specifications that point to the “RubyForge name” for the gem
- Add an index to the gem server that maps alias names to “RubyForge names”
- Only signed gems with an alias name will be included in this index
- When RubyGems looks for a gem to install it considers aliased gems as exact matches for a name, provided they satisfy the user’s trust policy
Using this solution, a user could install a gem that has a dependency on nokogiri. If nokogiri is signed on GitHub and there’s a newer version on GitHub than on RubyForge, the GitHub version would be installed.
Here are some discussions points this solution presents:
- GitHub currently builds gems for authors, so it is impossible for these gems to be signed. GitHub would have to store the author’s private key for signing.
- By default RubyGems sets no security policy, so it doesn’t address the name overlap problem (this default could be changed)
- Furthermore, it would not prevent a trusted author from turning rogue
- Using a trust policy, a user can choose to pull gems from GitHub for specific authors by trusting the author’s public key (e.g. only install signed gems, only install trusted gems)
- There’s no infrastructure for easily trusting an author’s key (beyond gem cert)
- It doesn’t give GitHub a central authority for gems, but one could be built through a web of trust
RubyGems code_swarm
Eric Hodel | Wed, 28 Jan 2009 00:59:32 GMT
I built a code_swarm visualization of the RubyGems repository history:
RubyGems code_swarm (HD) from Eric Hodel on Vimeo.
Coincidentally, you can find a code_swarm visualization for Rails and other projects by Ilya Grigorik. He points to Peter Burns’ fork on GitHub which has a much improved toolset for generating these types of visualizations.
I used the original repository which involves a lot more work. For RubyGems I did roughly the following:
- Get a log: svn log -v > rubygems.log
- Convert the log: python convert_logs.py -s rubygems.log -o rubygems.xml
- Munge the XML to remove the CVS conversion commits and hide the renames from trunk/rubygems/ to trunk/
- Run code_swarm: code_swarm rubygems.config
- Encode PNGs to an MP4: ffmpeg -f image2 -b 1500 -r 24 -i frames/rubygems-%05d.png -sameq rubygems.mp4
- Upload to Vimeo
I played around with the code_swarm configuration a bit and ended up with this config for code_swarm. My changes give a larger video with more lingering of files as they float around and bumps up font sizes for readability. For more active projects you may need to decrease FileLife and PersonLife. (Really, I’m not sure how they affect things.)
/usr/bin/gems reports "Gem::manage_gems is deprecated"
Eric Hodel | Fri, 16 Jan 2009 00:49:00 GMT
I was looking through my search keywords and found that a lot of people were searching for:
/usr/bin/gem:10:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009.
To fix this you need to remove /usr/bin/gem and symlink it to the proper gem executable.
Since RubyGems 1.0 the gem executable has been installed with a name matching your ruby executable. Often when you install Ruby through a packaging system the ruby executable is installed with a version appended like "ruby18" and a symlink named "ruby" points to the real ruby. For the "gem" executable you need to do this yourself.
To prevent problems like this in the future, read RubyGems release notes when you upgrade. RubyGems now prints them out after gem update --system and you can always find the RubyGems release notes posted as news items on RubyForge.
First, determine where the real gem executable is. You can figure out what the ruby executable's real name is like this:
$ gem env | grep 'RUBY EXEC' - RUBY EXECUTABLE: /usr/bin/ruby18
So your gem executable should really live at 'gem18'. Try it:
$ gem18 env | grep 'RUBY EXEC' - RUBY EXECUTABLE: /usr/bin/ruby18
To be extra sure, compare the full gem18 env output and gem env output.
To fix the warning, remove the gem executable and replace it with a symlink to gem18.
sudo rm /usr/bin/gem sudo ln -s /usr/bin/gem18 /usr/bin/gem
Now the warning should be gone.
Remember, to prevent problems like this in the future, read RubyGems' output when you upgrade. RubyGems also prints the release notes when you run gem update --system now.
PS: If you're seeing rake give this warning, that's an entirely different issue. Jim Weirich has a fixed rake in his release queue and it should be out before Gem::manage_gems goes away.
RubyGems 1.3.1
Eric Hodel | Thu, 13 Nov 2008 21:44:00 GMT
NOTE: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see “Nothing to update”.
Release 1.3.1 fixes some bugs.
Bugs fixed:
- Disregard ownership of ~ under Windows while creating ~/.gem. Fixes issues related to no uid support under Windows.
- Fix requires for Gem::inflate, Gem::deflate, etc.
- Make Gem.dir respect :gemhome value from config. (Note: this feature may be removed since it is hard to implement on 1.9.)
- Kernel methods are now private. Patch #20801 by James M. Lawrence.
- Gem::location_of_caller now behaves on Windows. Patch by Daniel Berger.
- Silence PATH warning.
Deprecation Notices:
- Gem::manage_gems will be removed on or after March 2009.
For a full list of changes to RubyGems and the contributor for each change, see the ChangeLog file.
Special thanks to Chad Wooley for backwards compatibility testing and Luis Lavena for continuing windows support.
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: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see “Nothing to update”.
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`.
Keep those gems coming!
—Jim & Chad & Eric (for the RubyGems team)
RubyGems 1.3.0
Eric Hodel | Fri, 26 Sep 2008 21:19:00 GMT
Release 1.3.0 adds new features and fixes some bugs.
Note! Some versions of RubyGems have a bug that will prevent automatic updates. If RubyGems says it has nothing to update, run:
gem install rubygems-update update_rubygems
New features:
- RubyGems doesn't print LOCAL/REMOTE titles for `gem query` and friends if stdout is not a TTY, except with --both.
- Added Gem.find_files, allows a gem to discover features provided by other gems.
- Added pre/post (un)install hooks for packagers of RubyGems. (Not for gem themselves).
- RubyGems now installs gems into ~/.gem if GEM_HOME is not writable. Use --no-user-install command-line switch to disable this behavior.
- Fetching specs for update now uses If-Modified-Since requests.
- RubyGems now updates the ri cache when the rdoc gem is installed and documentation is generated.
Deprecation Notices:
- Gem::manage_gems now warns when called. It will be removed on or after March 2009.
Bugs Fixed:
- RubyGems 1.3.0+ now updates when no previous rubygems-update is installed. Bug #20775 by Hemant Kumar.
- RubyGems now uses the regexp we already have for `gem list --installed`. Bug #20876 by Nick Hoffman.
- Platform is now forced to Gem::Platform::RUBY when nil or blank in the indexer. Fixes various uninstallable gems.
- Handle EINVAL on seek. Based on patch in bug #20791 by Neil Wilson.
- Fix HTTPS support. Patch #21072 by Alex Arnell.
- RubyGems now loads all cache files even if latest has been loaded. Bug #20776 by Uwe Kubosch.
- RubyGems checks for support of development dependencies for #to_ruby. Bug #20778 by Evan Weaver.
- Now specifications from the future can be loaded.
- Binary script uninstallation fixed. Bug #21234 by Neil Wilson.
- Uninstallation with -i fixed. Bug #20812 by John Clayton.
- Gem::Uninstaller#remove_all now calls Gem::Uninstaller#uninstall_gem so hooks get called. Bug #21242 by Neil Wilson.
- Gem.ruby now properly escaped on windows. Fixes problem with extension compilation.
- `gem lock --strict` works again. Patch #21814 by Sven Engelhardt.
- Platform detection for Solaris was improved. Patch #21911 by Bob Remeika.
Other Changes Include:
- `gem help install` now describes _version_ argument to executable stubs
- `gem help environment` describes environment variables and ~/.gemrc and /etc/gemrc
- On-disk gemspecs are now read in UTF-8 and written with a UTF-8 magic comment
- Rakefile
- If the SETUP_OPTIONS environment variable is set, pass its contents as arguments to setup.rb
- lib/rubygems/platform.rb
- Remove deprecated constant warnings and really deprecate them. (WIN32, etc).
- lib/rubygems/remote_fetcher.rb
- Now uses ~/.gem/cache if the cache dir in GEM_HOME is not writable.
- lib/rubygems/source_index.rb
- Deprecate options to 'search' other than Gem::Dependency instances and issue warning until November 2008.
- setup.rb
- --destdir folder structure now built using Pathname, so it works for Windows platforms.
- test/*
- Fixes to run tests when under test/rubygems/. Patch by Yusuke ENDOH [ruby-core:17353].
- test/test_ext_configure_builder.rb
- Locale-free patch by Yusuke Endoh [ruby-core:17444].
For a full list of changes to RubyGems and the contributor for each change, see the ChangeLog file.
Special thanks to Chad Wooley for backwards compatibility testing and Luis Lavena for continuing windows support.
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: RubyGems 1.1 and 1.2 have problems upgrading when there is no rubygems-update installed. You will need to follow the second set of update instructions if you see "Nothing to update".
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)
Gem Dependencies
Eric Hodel | Mon, 23 Jun 2008 22:28:40 GMT
I was chatting with Yehuda Katz, and somehow we ended up talking about speed:
Eric Hodel: I don’t worry about inheritance
Eric Hodel: or speed, for that matter
Yehuda Katz: heh
Yehuda Katz: that’s why you wrote RubyInline?
Eric Hodel: Ryan wrote RubyInline because, roughly, “How hard could it be?”
Eric Hodel: and an intense hatred of C
This got me thinking, how long did it take from RubyInline to be written until it was actually used? The RubyGems answer is 151 days, and by ParseTree, but RubyInline is actually about 2 years older than its gem, first committed on 2002/09/05.
To figure this out, I wrote a script that walks all the gems and figures out when a gem was first released, when a gem was first mentioned in a dependency, and the time between the two. Today, the figures are:
681 of 3234 gems used as dependencies (21%) average time to first use is 148 days maximum time to first use is 1332 (dnssd)
You can get the full output in the gem dependency report (which updates weekly), and download the gem dependency script too.
RubyGems 1.2.0
Eric Hodel | Sun, 22 Jun 2008 03:32:00 GMT
Announce: RubyGems Release 1.2.0
Release 1.2.0 adds new features and fixes some bugs.
New features:
- RubyGems no longer performs bulk updates and instead only fetches the gemspec files it needs. Alternate sources will need to upgrade to RubyGems 1.2 to allow RubyGems to take advantage of the new metadata updater. If a pre 1.2 remote source is in the sources list, RubyGems will revert to the bulk update code for compatibility.
- RubyGems now has runtime and development dependency types. Use
#add_development_dependencyand#add_runtime_dependency. All typeless dependencies are considered to be runtime dependencies. - RubyGems will now require
rubygems/defaults/operating_system.rbandrubygems/defaults/#{RBX_ENGINE}.rbif they exist. This allows packagers and ruby implementers to add custom behavior to RubyGems via these files. (If the RubyGems API is insufficient, please suggest improvements via the RubyGems list.) /etc/gemrc(and windows equivalent) for global settings- setup.rb now handles—vendor and—destdir for packagers
- gem stale command that lists gems by last access time
Bugs Fixed:
- File modes from gems are now honored, patch #19737
- Marshal Gem::Specification objects from the future can now be loaded.
- A trailing / is now added to remote sources when missing, bug #20134
- Gems with legacy platforms will now be correctly uninstalled, patch #19877
- gem install --no-wrappers followed by gem install --wrappers no longer overwrites executables
- gem pristine now forces reinstallation of gems, bug #20387
- RubyGems gracefully handles ^C while loading .gemspec files from disk, bug #20523
- Paths are expanded in more places, bug #19317, bug #19896
- Gem::DependencyInstaller resets installed gems every install, bug #19444
- Gem.default_path is now honored if GEM_PATH is not set, patch #19502
Other Changes Include:
- setup.rb
- stub files created by RubyGems 0.7.x and older are no longer removed. When upgrading from these ancient versions, upgrade to 1.1.x first to clean up stubs.
- RDoc is no longer required until necessary, patch #20414
- gem server
- Now completely matches the output of gem generate_index and has correct content types
- Refreshes from source directories for every hit. The server will no longer need to be restarted after installing gems.
- `gem query—details` and friends now display author, homepage, rubyforge url and installed location
- gem install without -i no longer reinstalls dependencies if they are in GEM_PATH but not in GEM_HOME
- Gem::RemoteFetcher now performs persistent connections for HEAD requests, bug #7973
For a full list of changes to RubyGems and the contributor for each change, see the ChangeLog file.
Special thanks to Chad Wooley for backwards compatibility testing and Luis Lavena for continuing windows support.
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: 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)

Articles