config/proc.sh in traquitana-0.1.7 vs config/proc.sh in traquitana-0.1.8
- old
+ new
@@ -162,10 +162,21 @@
chmod -R 0755 public/*
fi
}
#
+# Check if vendor javascript dir exists, if not, created it.
+# When compiling Rails 7.x assets, it will fail if not found
+#
+function vendor_javascript() {
+ msg "Checking vendor javascript diretory ..."
+ if [ ! -d 'vendor/javascript' ]; then
+ mkdir vendor/javascript
+ fi
+}
+
+#
# Fix current gems, running bundle
#
function fix_gems() {
msg "Fixing gems ..."
local basedir=$(gem_dir | cut -f1-3 -d/)
@@ -184,12 +195,21 @@
if [ "${basedir}" == "/home/${owner}" ]; then
msg "Performing a \e[1mlocal gem install on home dir\e[0m"
bundle install --without development test
# if user is not root and gemdir is not the home dir, install on vendor
else
- msg "Performing a \e[1mlocal gem install on vendor/bundle\e[0m"
- bundle install --path vendor/bundle --without development test
+ local version=$(bundle -v | grep -o -e "[0-9]\.[0-9]\.[0-9]" | cut -d'.' -f1)
+ msg "Performing a \e[1mlocal gem install on vendor/bundle with bundler version $version\e[0m"
+
+ # bundler version 2 doesnt have anymore those flags below
+ if [ $version -ge 2 ]; then
+ bundle config --local set path 'vendor/bundle'
+ bundle config --local set without 'development test'
+ bundle install
+ else
+ bundle install --path vendor/bundle --without development test
+ fi
fi
fi
}
#
@@ -302,9 +322,10 @@
activate_gems
fix_gems
createdb
channels
migrate
+vendor_javascript
assets
permissions
# restart server
if [ -x ./traq/server.sh -a -f ./traq/server.sh ]; then