I keep getting this error when trying to install alaveteli:
gaba@margarita ~/code/alaveteli (release/0.5 *) - $ ./script/rails-post-deploy
/home/gaba/code/alaveteli
commonlib/shlib/deployfns: line 50: /home/gaba/code/alaveteli/commonlib
/home/gaba/code/alaveteli/commonlib/bin/yaml2sh: No such file or directory
: shlib/deployfns read_conf: error loading config file config/general.yml
Anybody have any idea?
I'm using rvm with ruby 1.8.7 and rubygems 1.8.6
Gaba
Robin
Sent from my telephone
seb
--
skype: seb.bacon
mobile: 07790 939224
land: 01531 671074
gaba@margarita ~/code/alaveteli (release/0.5 *) - $ ./script/rails-post-deploy
++ pwd
+ APP_DIR=/home/gaba/code/alaveteli
+ cd app/..
/home/gaba/code/alaveteli
+ '[' -e config/general ']'
+ '[' -e config/general.yml ']'
+ . commonlib/shlib/deployfns
+++ _mysociety_commonlib_directory
++++ dirname commonlib/shlib/deployfns
+++ cd commonlib/shlib/..
+++ pwd
++ MYSOCIETY_COMMONLIB_DIR='/home/gaba/code/alaveteli/commonlib
/home/gaba/code/alaveteli/commonlib'
+ read_conf config/general
++ mktemp /tmp/ms-deploy-configsource.XXXXXX
+ CONF_SOURCE=/tmp/ms-deploy-configsource.HRb3LR
+ case "$1" in
+ '[' -f config/general.yml ']'
+ '[' -e config/general ']'
+ '/home/gaba/code/alaveteli/commonlib
/home/gaba/code/alaveteli/commonlib/bin/yaml2sh' --prefix=OPTION_
config/general.yml
commonlib/shlib/deployfns: line 51: /home/gaba/code/alaveteli/commonlib
/home/gaba/code/alaveteli/commonlib/bin/yaml2sh: No such file or directory
+ die 'shlib/deployfns read_conf: error loading config file config/general.yml'
+ echo -e : 'shlib/deployfns read_conf: error loading config file
config/general.yml'
: shlib/deployfns read_conf: error loading config file config/general.yml
+ exit 1
gaba@margarita ~/code/alaveteli (release/0.5 *) - $
When I run the yaml2sh 'by hand' I get the configuration file
gaba@margarita ~/code/alaveteli (release/0.5 *) - $
./commonlib/bin/yaml2sh config/general.yml
ISO_COUNTRY_CODE='GB'
DOMAIN='127.0.0.1:3000'
INCOMING_EMAIL_DOMAIN='localhost'
ADMIN_PASSWORD='passwordx'
TRACK_SENDER_NAME='Alaveteli Webmaster'
INCOMING_EMAIL_SECRET='xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx'
READ_ONLY=''
TWITTER_USERNAME='whatdotheyknow'
AVAILABLE_LOCALES='en es'
DEFAULT_LOCALE='en'
STAGING_SITE='1'
ADMIN_PUBLIC_URL=''
GAZE_URL='http://gaze.mysociety.org'
MAX_REQUESTS_PER_USER_PER_DAY='6'
TRACK_SENDER_EMAIL='postmaster@localhost'
BLOG_FEED='http://www.mysociety.org/category/projects/whatdotheyknow/feed/'
INCOMING_EMAIL_PREFIX=''
FORWARD_NONBOUNCE_RESPONSES_TO='user-support@localhost'
CONTACT_NAME='Alaveteli Webmaster'
RECAPTCHA_PRIVATE_KEY='x'
USE_GHOSTSCRIPT_COMPRESSION='True'
COOKIE_STORE_SESSION_SECRET='your secret key here, make it long and random'
...
I'm no bash scripter, so I don't know the solution (Robin?), but the
proximate cause here is:
On 8 February 2012 04:22, Gabriela <gabe...@gmail.com> wrote:
> ++ MYSOCIETY_COMMONLIB_DIR='/home/gaba/code/alaveteli/commonlib
> /home/gaba/code/alaveteli/commonlib'
As in, that variable is being set as the same thing, twice. It should be
> ++ MYSOCIETY_COMMONLIB_DIR='/home/gaba/code/alaveteli/commonlib'
It's as if the `cd` call at
https://github.com/mysociety/commonlib/blob/master/shlib/deployfns#L22
was outputting the current working directory, as well as the `pwd`
that follows.
Sorry it's such a struggle!
Seb
Does that make any difference, Gabriela?cd "$(dirname "${BASH_SOURCE[0]}")"/.. > /dev/null