# How to find ruby header file without platform dependency

**URL:** <https://www.ruby-forum.com/t/how-to-find-ruby-header-file-without-platform-dependency/178851>\
**Category:** Ruby\
**Created:** [November 12, 2009, 10:24am UTC](https://www.ruby-forum.com/t/how-to-find-ruby-header-file-without-platform-dependency/178851 "2009-11-12T10:24:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jun\_YSKim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Post date:** [November 12, 2009, 10:24am UTC](https://www.ruby-forum.com/t/how-to-find-ruby-header-file-without-platform-dependency/178851/1 "2009-11-12T10:24:49Z")

</div>

Hello everyone.

Now I am wondering to have a way to find a location of the ruby header  
file in various platforms whenever I try to configure to compile my  
sources.

in case of python, it provide the ‘python-config’ executable file to  
find a location of python.h.

how about ruby?

Is there any possible way to get a location(path) of it.

thanks for all.

---

<div class="post-metadata">

**Author:** ![Jun\_YSKim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Post date:** [November 12, 2009, 10:54am UTC](https://www.ruby-forum.com/t/how-to-find-ruby-header-file-without-platform-dependency/178851/2 "2009-11-12T10:54:05Z")

</div>

On Thursday 12 November 2009, Jun Y. Kim wrote:

> |  
> |Is there any possible way to get a location(path) of it.  
> |  
> |thanks for all.  
> |

You can look at the Config module and, in particular, at Config::CONFIG,  
which  
is a hash containing a number of build-time settings.

For example (using ruby 1.9):

require ‘rbconfig’ #you don’t need this line in ruby 1.8  
puts Config::CONFIG.keys.sort

=\>  
[“ALLOCA”, “AR”, “ARCHFILE”, “ARCH\_FLAG”, “AS”, “ASFLAGS”, “BASERUBY”,  
“BUILTIN\_TRANSSRCS”, “CC”, “CCDLFLAGS”, “CFLAGS”, “COMMON\_HEADERS”,  
“COMMON\_LIBS”, “COMMON\_MACROS”, “COUTFLAG”, “CP”, “CPP”, “CPPFLAGS”,  
“CPPOUTFILE”, “CXX”, “CXXFLAGS”, “DEFS”, “DESTDIR”, “DLDFLAGS”,  
“DLDLIBS”,  
“DLEXT”, “DLEXT2”, “DLLWRAP”, “ECHO\_C”, “ECHO\_N”, “ECHO\_T”, “EGREP”,  
“ENABLE\_SHARED”, “EXEEXT”, “EXPORT\_PREFIX”, “EXTOUT”, “EXTSTATIC”,  
“GNU\_LD”,  
“GREP”, “INSTALL”, “INSTALL\_DATA”, “INSTALL\_PROGRAM”, “INSTALL\_SCRIPT”,  
“LDFLAGS”, “LDSHARED”, “LDSHAREDXX”, “LIBEXT”, “LIBPATHENV”,  
“LIBPATHFLAG”,  
“LIBRUBY”, “LIBRUBYARG”, “LIBRUBYARG\_SHARED”, “LIBRUBYARG\_STATIC”,  
“LIBRUBY\_A”, “LIBRUBY\_ALIASES”, “LIBRUBY\_DLDFLAGS”, “LIBRUBY\_LDSHARED”,  
“LIBRUBY\_SO”, “LIBS”, “LINK\_SO”, “LN\_S”, “MAINLIBS”, “MAJOR”,  
“MAKEDIRS”,  
“MAKEFILES”, “MANTYPE”, “MINOR”, “NM”, “NROFF”, “OBJCOPY”, “OBJDUMP”,  
“OBJEXT”, “OUTFLAG”, “PACKAGE\_BUGREPORT”, “PACKAGE\_NAME”,  
“PACKAGE\_STRING”,  
“PACKAGE\_TARNAME”, “PACKAGE\_VERSION”, “PATH\_SEPARATOR”, “PREP”,  
“RANLIB”,  
“RDOCTARGET”, “RM”, “RMALL”, “RMDIRS”, “RPATHFLAG”,  
“RUBYW\_INSTALL\_NAME”,  
“RUBY\_INSTALL\_NAME”, “RUBY\_SO\_NAME”, “SET\_MAKE”, “SHELL”, “SOLIBS”,  
“STATIC”,  
“STRIP”, “TEENY”, “THREAD\_MODEL”, “TRY\_LINK”, “WINDRES”, “arch”,  
“archdir”,  
“bindir”, “build”, “build\_alias”, “build\_cpu”, “build\_os”,  
“build\_vendor”,  
“cflags”, “configure\_args”, “cppflags”, “datadir”, “datarootdir”,  
“debugflags”, “docdir”, “dvidir”, “exec\_prefix”, “host”, “host\_alias”,  
“host\_cpu”, “host\_os”, “host\_vendor”, “htmldir”, “includedir”,  
“infodir”,  
“libdir”, “libexecdir”, “localedir”, “localstatedir”, “mandir”,  
“oldincludedir”, “optflags”, “pdfdir”, “prefix”, “psdir”,  
“ruby\_install\_name”,  
“ruby\_version”, “rubyhdrdir”, “rubylibdir”, “rubyw\_install\_name”,  
“sbindir”,  
“setup”, “sharedstatedir”, “sitearch”, “sitearchdir”, “sitedir”,  
“sitehdrdir”,  
“sitelibdir”, “sysconfdir”, “target”, “target\_alias”, “target\_cpu”,  
“target\_os”, “target\_vendor”, “topdir”, “vendorarchdir”, “vendordir”,  
“vendorhdrdir”, “vendorlibdir”, “warnflags”]

I hope this helps

Stefano

---

<div class="post-metadata">

**Author:** ![Jun\_YSKim](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a587f6/32.png) [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Post date:** [November 13, 2009, 7:49am UTC](https://www.ruby-forum.com/t/how-to-find-ruby-header-file-without-platform-dependency/178851/3 "2009-11-13T07:49:47Z")

</div>

thanks stefano. 🙂

1. 
  1. 12., ¿ÀÈÄ 6:53, Stefano C. ÀÛ¼º:
