From 92fc64655c5b51ddec3286befd87d9693ca718c2 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 5 Nov 2014 15:07:54 +0000 Subject: Update to use bundler and work on Ubuntu Trusty. Switching to bundler saves confusion about gem paths when running sass/compass to compile the CSS. Trusty can use precisely the same packages as precise, with a few tweaks to generalise the contents. --- bin/install-as-user | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'bin/install-as-user') 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 <