You are on page 1of 2

#!

/bin/bash
if [ -s /usr/local/share/chruby/chruby.sh ]; then
. /usr/local/share/chruby/chruby.sh
. /usr/local/share/chruby/auto.sh
fi
function install_bundler() {
if ! gem list | grep -q 'bundler'; then
ruby -v
if [ -n "$1" ]; then
gem install bundler -v "$1"
else
gem install bundler
fi
fi
}
# ruby-install --no-download --no-verify --no-reinstall ruby 1.8.7-p375 -- CC=gc
c-5 --without-tcl --without-tk
# chruby 1.8.7-p375
# if [ -s ~/src/rubygems-1.6.2/setup.rb ]; then
#
~/.rubies/ruby-1.8.7-p375/bin/ruby ~/src/rubygems-1.6.2/setup.rb
# fi
# # install_bundler 1.1.1
# install_bundler 1.10.6
ruby-install --no-reinstall ruby 1.9.3-p551 -- --without-tcl --without-tk
chruby 1.9.3-p551
install_bundler 1.10.6
ruby-install --no-reinstall ruby 2.0.0-p648 -- --without-tcl --without-tk
chruby 2.0.0-p648
install_bundler 1.10.6
# ruby-install --no-reinstall ruby 2.1.2 -- --without-tcl --without-tk
# chruby 2.1.2
# install_bundler
# ruby-install --no-reinstall ruby 2.3.0 -- --without-tcl --without-tk
# chruby 2.3.0
# install_bundler
function bundle_install() {
local dir="$1"
if [ -d "$dir" ] && [ -f "$dir/Gemfile" ]; then
echo "$dir"
cd "$dir"
ruby -v
bundle install
fi
}
# chruby 1.8.7-p375
# bundle_install ~/Projects/works/supost/supost2
# chruby 2.0.0-p648
# bundle_install ~/Projects/works/supost/calaxe
chruby 1.9.3-p551

bundle_install
bundle_install
bundle_install
bundle_install

~/Projects/works/hubhello/hubworks
~/Projects/works/hubhello/dashboard
~/Projects/works/hubhello/hw-child
~/Projects/works/hubhello/integra_pay

# chruby 2.1.2
# bundle_install ~/Projects/phongnh/api-on-rails/marketplaceapi
# chruby 2.3.0
# bundle_install ~/Projects/phongnh/game_data_analytics

You might also like