Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > RubyGems post-install hook

Thread Tools

RubyGems post-install hook

Alex Gutteridge
Posts: n/a

I'm trying to package a Ruby library using Gems but have run into the
problem of needing to execute some post-install commands a la setup.rb.
Searching the archives brought this up from Dec 2004:

Am I right in thinking that RubyGems doesn't support these kind of
post-install hooks? Are there any plans to in the future?

As a proof of concept I knocked together a hacked rubygems which uses
the SerializableProc class from Ruby Quiz 38
( to allow something like this to

require 'rubygems'

spec = do |s| = "test"
s.version = "0.2.1"
s.summary = "A test"


#This proc gets stored in the gem and called after installation
s.post_install_proc = %q{ system("echo 'I ran'") }


It's buggy as hell, but with a bit of cleaning is essentially all I
would need for my purposes.

Alex Gutteridge <(E-Mail Removed)>

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rubygems 1.3.5 can't load 'rubygems/defaults/operating_sy..' Eric Roscher Ruby 3 11-24-2009 02:15 AM
rubygems install hook Ruby 7 02-20-2008 02:20 PM
Missing URL Search Hook =?Utf-8?B?cGVyZmVjdDAwMDM=?= Wireless Networking 2 03-11-2005 03:01 PM
[BUG] RubyGems: "No such file to load -- rubygems/builder" Erik Veenstra Ruby 4 02-04-2005 10:28 PM
Problems with fresh install of RubyGems on Ubuntu Linux: No suchfile to load -- rubygems/builder (LoadError) Trevor Ruby 5 01-29-2005 12:52 AM