aboutsummaryrefslogtreecommitdiffstats
path: root/bin/install-as-user
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2014-11-07 16:46:00 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2014-11-07 16:46:00 +0000
commit1bd78da3b7e1125fe6e30118f61e5265f805c2fd (patch)
treed4387c59602af04b3d659cce3c5e636cc4277bae /bin/install-as-user
parent5890095563269359385313253b45f6033de5e8f5 (diff)
parentd8a7e85e32a5ef6cdda9385d389df2dab3245121 (diff)
Merge branch 'trusty-tahr'
Diffstat (limited to 'bin/install-as-user')
-rwxr-xr-xbin/install-as-user21
1 files changed, 9 insertions, 12 deletions
diff --git a/bin/install-as-user b/bin/install-as-user
index bd48bdebb..ebff69ed2 100755
--- a/bin/install-as-user
+++ b/bin/install-as-user
@@ -71,25 +71,22 @@ if [ ! "$DEVELOPMENT_INSTALL" = true ]; then
fi
# Install the compass gem locally - it's required for generating the
-# CSS:
+# CSS. Don't trust the bundled bundler in e.g. precise.
echo "Setting up CSS... "
-export GEM_HOME="$DIRECTORY/gems"
-mkdir -p "$GEM_HOME"
-export GEM_PATH=
-export PATH="$GEM_HOME/bin:$PATH"
+gem1.9.1 install --user-install --no-ri --no-rdoc bundler
+FMS_GEMPATH="$DIRECTORY/gem-bin"
+FMS_GEMPATH="$FMS_GEMPATH:$(ruby1.9.1 -rubygems -e 'puts Gem.user_dir')/bin"
+export PATH="$FMS_GEMPATH:$PATH"
-if ! grep -q 'Set up local gem directory for FixMyStreet' $HOME/.bashrc; then
+if ! grep -q 'Set up local PATH for FixMyStreet' $HOME/.bashrc; then
cat >>$HOME/.bashrc <<EOBRC
-# Set up local gem directory for FixMyStreet
-export GEM_HOME="$DIRECTORY/gems"
-export GEM_PATH=
-export PATH="\$GEM_HOME/bin:\$PATH"
+# Set up local PATH for FixMyStreet
+export PATH="$FMS_GEMPATH:\$PATH"
EOBRC
fi
-gem install --no-ri --no-rdoc sass -v 3.2.14
-gem install --no-ri --no-rdoc compass -v 0.12.2
+bundle install --deployment --path "$DIRECTORY/gems" --binstubs "$DIRECTORY/gem-bin"
# Use compass to generate the CSS, if it doesn't seem to already
# exist: