[Snow-iMac:~/Desktop/Programming/rubyforger] ari% ruby extconf.rb
can’t find header files for ruby.
Am I the only one having this issue? I have found ruby.h (assuming
that’s the file it’s looking for), and it’s in the normal directory.
I have had this issue every time I try to install a new Ruby library.
I suppose ruby.h is not the file it’s looking for?
Thanks,
Ari
--------------------------------------------|
If you’re not living on the edge,
then you’re just wasting space.
[Snow-iMac:~/Desktop/Programming/rubyforger] ari% ruby extconf.rb
can’t find header files for ruby.
Am I the only one having this issue? I have found ruby.h (assuming
that’s the file it’s looking for), and it’s in the normal
directory. I have had this issue every time I try to install a new
Ruby library.
I suppose ruby.h is not the file it’s looking for?
You’re running the version of Ruby that comes pre-installed with OS X,
right? Apple got the header files installed in the wrong location. Your
best bet is to install your own version of Ruby in /usr/local.
Couldn’t I just move the file around? And should I reinstall it in
/usr/bin or /usr/local?
You could, but installing your own version of Ruby is easy and you can
keep up with new releases. Not to mention you become the master of your
own destiny, at least as far as Ruby is concerned
You should install it in /usr/local and then modify your PATH to put
/usr/local in front. Put this in your ~/.profile file:
export PATH=/usr/local:$PATH
You can learn about PATH and .profile by issuing the “man bash” command
in a Terminal window, or just Google it.
You’re running the version of Ruby that comes pre-installed with
OS X, right? Apple got the header files installed in the wrong
location. Your best bet is to install your own version of Ruby in /
usr/local.
Couldn’t I just move the file around? And should I reinstall it in /
usr/bin or /usr/local?
By installing your own version of ruby you can be reasonably sure
that everything will be correct. If you start mucking about with the
existing version you might break something and never be able to fix
it without re-installing.
Anyway…
It’s not one file it’s directory that is in the wrong place. Where is
your ruby currently residing? If it is /usr/bin then check in /usr/
lib to see if there is a ruby directory.
You’re running the version of Ruby that comes pre-installed with OS
X, right? Apple got the header files installed in the wrong
location. Your best bet is to install your own version of Ruby in /
usr/local.
Couldn’t I just move the file around? And should I reinstall it in /
usr/bin or /usr/local?
Thank you. I will frame this email.
-------------------------------------------|
Nietzsche is my copilot
Ok everyone - it worked. Thanks everyone for helping me through this
issue. It was like the midlife crisis of my teens.
BUT when I tried to change my path, it didn’t work. I’m using tcsh,
and am doing two things:
setting my path directly through the command line:
setenv PATH /usr/local/bin/:$PATH
and through /private/etc/csh.cshrc
I am adding setenv PATH /usr/local/bin/:$PATH to the end of the file
and saving it.
Huh?
Out of the frying pan and into the fire. Well, at least onto a rather
hot surface.
--------------------------------------------|
If you’re not living on the edge,
then you’re just wasting space.
You’re running the version of Ruby that comes pre-installed
with OS X, right? Apple got the header files installed in the
wrong location. Your best bet is to install your own version
of Ruby in /usr/local.
This is the reason I absolutely hated compiling anything on a mac at my
old job. Apple stuffs libraries in god knows where, and it’s a
nightmare trying to figure it all out. Of course, if you use Xcode to
compile, it knows where they all are (most of the time), but try getting
the admins to let you run Xcode on a server…
Thankfully, my new job is working with *BSD and linux.
file and saving it.
Which version of OSX are you using?
The tcsh shell was default in Panther, but in Tiger default is bash.
Bash is a bit easier, since there is more current stuff on blogs and
websites to help you with that.
Either way, consider getting the book Unix in a Nutshell. It covers
all the major unixes including OSX and the major shells.
You’ll find it handy as a reference when you want to install or
change things in OSX.
the Hivelogic site does have pretty much the best and most up-to-date
how-to’s on installing Ruby/Rails/etc… on OSX.
The preferred environment is to do your own install, since Apple
admittedly munged the factory Ruby install.
Good news is, it is easy to do and the experience will help you
learning about the unix command line environment more.
More good news, the next OSX, Leopard, has it installed correctly.
You’re running the version of Ruby that comes pre-installed with OS X,
right? Apple got the header files installed in the wrong location. Your
best bet is to install your own version of Ruby in /usr/local.
This was IIRC fixed in 10.4.8.
I think that the problem Ari has is that he didn’t select the
BSD/Xcode SDK when installing Mac OS X. By default the Ruby headers
are not installed, you need to implicitly specify this during install
(or post install, browse the DVD and install the right .pkg).