funkymunky
funkymunky

Reputation: 1831

Can't install ruby 1.9.1 on MacOSX 10.6

I can't seem to be get Ruby installed on my Mac. These are the steps I've taken so far:

  1. Downloaded the package from Ruby's site (http://www.ruby-lang.org/en/downloads/)
  2. Unpacked it running { tar xzvf ruby-1.9.1-p376.tar.gz }
  3. Went into the new ruby folder, and configured using {./configure}

This is where the error happens. When I run the configure, it gives me the error:

/usr/local/include/fuse/fuse_common.h:32:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
In file included from /usr/local/include/fuse/fuse.h:857,
                 from <command-line>:0:
/usr/local/include/fuse/fuse_compat.h:69:24: error: sys/statfs.h: No such file or directory

As a result, I can't make the package nor install it. I have no idea what is wrong. Any help is greatly appreciated. Thanks!

Upvotes: 0

Views: 1686

Answers (5)

nedski
nedski

Reputation: 126

If the last line of configure output is

config.status: creating Makefile

then you have a makefile and you can try building it.

I got the fuse.h error, and just ran make to build a working ruby:

[neilk@maczombie ~]$ ruby --version
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.2.0]

Upvotes: 2

Dave Bacher
Dave Bacher

Reputation: 15972

Looks like others have run into this issue.

If you want need the binary, you could try rubyosx.

I guessing that the issue is that you have FUSE (or MacFUSE) installed in /usr/local and for whatever reason, the configure phase is doing something that's including it. If you're not trying to build ruby with some local extensions, but you want to build ruby yourself, try moving aside /usr/local (at least temporarily).

sudo mv /usr/local /usr/local.aside

(Beware, randomly messing with /usr and /usr/local directories can lead to trouble.)

Upvotes: 1

prodigitalson
prodigitalson

Reputation: 60413

This isnt ananswer so much as a suggested alternative... use macports :-)

Upvotes: -2

jonnii
jonnii

Reputation: 28312

Have you tried RVM? It lets you manage multiple versions of ruby and will take of installing them and managing any gem versions for you. It's pretty magic!

After you've installed it all you need to do is:

`rvm install 1.9`

Done!

Upvotes: 3

JT.
JT.

Reputation: 31

What happens if you set C_Flags or CPP_Flags before doing your ./configure?

Upvotes: 0

Related Questions