Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Ruby bundler gems as Xcode build scripts

Tags:

xcode

ios

bundler

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).

like image 746
charlag Avatar asked Sep 17 '25 21:09

charlag


1 Answers

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 ....

like image 161
charlag Avatar answered Sep 20 '25 11:09

charlag