carlhuda/bundler — Issue #1590: Allow setting environment variables from Gemfile
Author: tinyclanger
Created: 2011-12-15 12:29:50+00:00
State: open

I'm running on Mac OS X 10.7.2 with Xcode 4.2, where the default compiler is clang. Unfortunately, not all gems with native code compile cleanly under clang, and it's necessary to set `CC=gcc4.2` before installing.

That's fine when building from the command line, but means these gems can't be built by bundler without ugly hacks involving symlinking binaries, with all the potential that has for unrelated breakage.

I can't see a way of setting an environment variable from within the Gemfile; would it be possible to support something like `env 'CC', 'gcc-4.2'`?

(This seems to follow on from #1058.)