Skip to content

Commit

Permalink
Fix to support LLVM/ruby that ships with Xcode 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
seanknox committed Apr 18, 2014
1 parent 565e3e9 commit be29883
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
10 changes: 9 additions & 1 deletion script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit be29883

Please sign in to comment.