Fix to support LLVM/ruby that ships with Xcode 5.1

This commit is contained in:
Sean Knox 2014-04-17 13:10:08 -07:00
parent 565e3e96a6
commit be298839fa
2 changed files with 9 additions and 15 deletions

View file

@ -81,20 +81,6 @@ cd /opt/boxen/repo
./script/boxen
```
**Note**
If you are creating a fresh install on Xcode 5.1 there is a clang issue with
certain Ruby Gems. There is a Stackoverflow post [here](http://stackoverflow.com/questions/22352838/ruby-gem-install-json-fails-on-mavericks-and-xcode-5-1-unknown-argument-mul)
To run the Boxen script follow these instructions
```
cd /opt/boxen/repo
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future ./script/boxen
```
You can also skip the above steps and <a href="#customizing">customize your
boxen</a> before installing it.
### Distributing
That's enough to get your boxen into a usable state on other machines,

View file

@ -23,8 +23,16 @@ if [ $? -eq 0 ]; then
fi
set -e
CLT_VERSION=`pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version | cut -f 2 -d ' ' | awk ' { print $1; } '`
# Bundle install unless we're already up to date.
/usr/bin/bundle install --binstubs bin --path .bundle --quiet "$@"
if [[ $CLT_VERSION =~ ^5\.1\.0\.0\.1\.1396320587 ]]; then
# Fix for LLVM that ships with Xcode 5.1
ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future /usr/bin/bundle install --binstubs bin --path .bundle --quiet "$@"
else
/usr/bin/bundle install --binstubs bin --path .bundle --quiet "$@"
fi
# Fix the binstubs to use system ruby
find bin -not -path 'bin/\.*' -type f -print0 | xargs -0 /usr/bin/sed -i '' 's|/usr/bin/env ruby|/usr/bin/ruby|g'