Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

RubyGems post-install hook

 
 
Alex Gutteridge
Guest
Posts: n/a
 
      07-21-2006
Hi,

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:

http://makeashorterlink.com/?N1E21217D

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
(http://www.rubyquiz.com/quiz38.html) to allow something like this to
work:

require 'rubygems'

spec = Gem::Specification.new do |s|
s.name = "test"
s.version = "0.2.1"
s.summary = "A test"

#....yadda...yadda....

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

end

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)-u.ac.jp>


 
Reply With Quote
 
 
 
Reply

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 ara.t.howard@noaa.gov 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



Advertisments