- BUNDLER=bundler
- if test -x $PWD/bin/bundler ; then
- # If present, use the one associated with rails workbench or API
- BUNDLER=$PWD/bin/bundler
+ BUNDLER=bundle
+ if test -x $PWD/bin/bundle ; then
+ # If present, use the one associated with rails API
+ BUNDLER=$PWD/bin/bundle
+ fi
+
+ if test -z "$(flock $GEMLOCK /var/lib/arvados/bin/gem list | grep 'arvados[[:blank:]].*[0-9.]*dev')" ; then
+ (cd /usr/src/arvados/sdk/ruby && \
+ /var/lib/arvados/bin/gem build arvados.gemspec && flock $GEMLOCK /var/lib/arvados/bin/gem install $(ls -1 *.gem | sort -r | head -n1))