简体   繁体   中英

upgrading ruby 1.8.7 on mac osx lion

So i'm trying to upgrade ruby with home brew but it doesn't seem to be working because im getting this error:

brew install ruby

Warning: No developer tools installed.
You should install the Command Line Tools.
The standalone package can be obtained from
  https://developer.apple.com/downloads
or it can be installed via Xcode's preferences.
==> Installing dependencies for ruby: pkg-config, readline, libyaml, make
==> Installing ruby dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.28.lion.bottle
Already downloaded: /Library/Caches/Homebrew/pkg-config-0.28.lion.bottle.2.tar.gz
==> Pouring pkg-config-0.28.lion.bottle.2.tar.gz
sh: -L: invalid option
Usage:  sh [GNU long option] [option] ...
    sh [GNU long option] [option] script-file ...
GNU long options:
    --debug
    --debugger
    --dump-po-strings
    --dump-strings
    --help
    --init-file
    --login
    --noediting
    --noprofile
    --norc
    --posix
    --protected
    --rcfile
    --restricted
    --verbose
    --version
    --wordexp
Shell options:
    -irsD or -c command or -O shopt_option      (invocation only)
    -abefhkmnptuvxBCHP or -o option
Error: Failure while executing:  -L /usr/local/Cellar/pkg-config/0.28/bin/pkg-config
Warning: Bottle installation failed: building from source.
Error: pkg-config cannot be built with any available compilers.
To install this formula, you may need to:
  brew install gcc

I'm adding x-code right now because it's a new machine and lost it, but is there some other stuff I'm missing. I ran brew doctor and got these additional warnings.

sh: line 1:  1977 Segmentation fault: 11  git --version > /dev/null 2>&1
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Git could not be found in your PATH.
Homebrew uses Git for several internal functions, and some formulae use Git
checkouts instead of stable tarballs. You may want to install Git:
  brew install git

Warning: No developer tools installed.
You should install the Command Line Tools.
The standalone package can be obtained from
  https://developer.apple.com/downloads
or it can be installed via Xcode's preferences.

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
    /usr/local/include/node/android-ifaddrs.h
    /usr/local/include/node/ares.h
    /usr/local/include/node/ares_version.h
    /usr/local/include/node/libplatform/libplatform.h
    /usr/local/include/node/nameser.h
    /usr/local/include/node/node.h
    /usr/local/include/node/node_buffer.h
    /usr/local/include/node/node_internals.h
    /usr/local/include/node/node_object_wrap.h
    /usr/local/include/node/node_version.h
    /usr/local/include/node/openssl/opensslconf.h
    /usr/local/include/node/pthread-fixes.h
    /usr/local/include/node/smalloc.h
    /usr/local/include/node/stdint-msvc2008.h
    /usr/local/include/node/tree.h
    /usr/local/include/node/uv-aix.h
    /usr/local/include/node/uv-bsd.h
    /usr/local/include/node/uv-darwin.h
    /usr/local/include/node/uv-errno.h
    /usr/local/include/node/uv-linux.h
    /usr/local/include/node/uv-sunos.h
    /usr/local/include/node/uv-threadpool.h
    /usr/local/include/node/uv-unix.h
    /usr/local/include/node/uv-version.h
    /usr/local/include/node/uv-win.h
    /usr/local/include/node/uv.h
    /usr/local/include/node/v8-debug.h
    /usr/local/include/node/v8-platform.h
    /usr/local/include/node/v8-profiler.h
    /usr/local/include/node/v8-testing.h
    /usr/local/include/node/v8-util.h
    /usr/local/include/node/v8.h
    /usr/local/include/node/v8config.h
    /usr/local/include/node/v8stdint.h
    /usr/local/include/node/zconf.h
    /usr/local/include/node/zlib.h

I realized it says git cant be found in path, but I don't know how to add that, so maybe that is my problem. I installed git but it's also acting up, any thoughts?

You should consider using RVM

See: http://railsapps.github.io/installrubyonrails-mac.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM