charlag
charlag

Reputation: 1037

Run Ruby bundler gems as Xcode build scripts

I use Bundler to manage gems in my iOS project. I want to be able to run gems from bundle automatically during the build.
However, if I'm trying to use bundle in 'run script' build stage, Xcode cannot find command bundle (which is reasonable, since we're modifying $PATH in .bash_profile).

Upvotes: 4

Views: 1141

Answers (1)

charlag
charlag

Reputation: 1037

There are few ways to modify OS X environment variables. However, there's an easy workaround in this case.
In the 'run script' build stage:
source ~/.bash_profile && bundle exec ....

Upvotes: 4

Related Questions