From: John Ky Date: 2009-01-15T13:53:22+09:00 Subject: Re: Finding ruby.h ------=_Part_388089_2878058.1231995262655 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, Thanks everyone for your help. I've settled with this solution as I've already got it working. Very much appreciated! -John On Wed, Jan 14, 2009 at 4:44 PM, Jeremy Hinegardner wrote: > On Wed, Jan 14, 2009 at 02:20:00PM +0900, John Ky wrote: > > Hi, > > > > I'm building ruby extensions across many different OSes and > architectures. > > > > Does anyone know an easy way to find ruby.h on any given system? > > > > I'm told that perl has a "perl -V" or @ENV variable which gives some > paths I > > can look through for perl.h. > > > > Does Ruby have an equivalent? Is there a better way to find ruby.h? > > This works on a couple of my systems: > > require 'rbconfig' > loc = File.join( Config::CONFIG['archdir'], 'ruby.h') > if File.exist?( loc ) then > puts loc > else > puts "Unable to find ruby.h in #{loc}" > end > > enjoy, > > -jeremy > > -- > ======================================================================== > Jeremy Hinegardner jeremy@hinegardner.org > > > ------=_Part_388089_2878058.1231995262655--