Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Allan Bonadio
RE: can't find header files for ruby [ reply ]  
2008-02-06 08:16
OK, got past that problem. Here's what I did.

I went to my ruby build directory, it's mostly flat with subdirs for different platforms. The top level .h files are what you need. in a different location. I did this:

# cp *.h /usr/lib/ruby/1.8/universal-darwin9.0

That destination directory is apparently Config::CONFIG["archdir"], if you know how to get to that. I did, then I lost my place. But if you start at /usr/lib/ruby and feel your way down, on any platform, should work.

I think if you didn't get the source, you can get 'ruby-devel' and that'll have .h files in it.

hmmm... apparently four of those .h files were already there. Or, ahem, files of the same name were already there and I copied them over. Well, this is why I never get sysadmin jobs. We just cross our fingers.

Then I start over. # gem install ruby-debug

Now I'm getting tons of errors all about how it can't find string.h, stdlib.h and other old favorites. hhmmm... probly some mac thing.



By: Allan Bonadio
can't find header files for ruby [ reply ]  
2008-02-06 07:09
OK, I didn't even get as far as Joe Case. I do the install mantra (with or without the -y or even from downloaded .gem files) and this is what I get:

# gem install ruby-debug -y
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.

ruby extconf.rb install ruby-debug -y
can't find header files for ruby.


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/ruby-debug-base-0.10.0 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/ruby-debug-base-0.10.0/ext/gem_make.out


OK, so here's funny things going on with my system:
- Mac OS X.5 (leopard)
- with xcode 2.5 installed, so all the programming goodies like gcc and make are in /Xcode2.5/usr/bin
- Built Ruby 1.8.6 from source in a location of my choosing. Didn't think that would be a problem.

So where can I move the Ruby186 sources so it'll find the include files? Or, can I symlink it? Or can I hack some file somewhere to go grab them in the location I have?