linux - Psych error on Capistrano deployment -
i have capistrano deployment script have work time, throw such error on deployment:
/users/lifecoder/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): control characters not allowed @ line 1 column 1 (psych::syntaxerror) /users/lifecoder/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/psych.rb:203:in `parse_stream' /users/lifecoder/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/psych.rb:151:in `parse' /users/lifecoder/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/psych.rb:127:in `load' ...
it throws several warnings during deployment:
** [out :: test.domain] warning! path not set up, '/home/lifecoder/.rvm/gems/ruby-1.9.3-p448/bin' not @ first place, ** [out :: test.domain] ** [out :: test.domain] caused shell initialization files - check them 'path=...' entries, ** [out :: test.domain] ** [out :: test.domain] fix run: 'rvm use ruby-1.9.3-p448'.
i have found similar problem here , assume warning cause of psych crash. can't rid of it, path looks me, , rvm is in first place when connect via ssh , check it:
$ echo $path /home/lifecoder/.rvm/gems/ruby-1.9.3-p448/bin:/home/lifecoder/.rvm/gems/ruby-1.9.3-p448@global/bin:/home/lifecoder/.rvm/rubies/ruby-1.9.3-p448/bin:/home/lifecoder/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
i'm not proficient in *nix miss - can't find exactly.
i know fixable yaml parser engine change, or deleting yaml file somewhere psych wouldn't start, prefer fix issue in right way.
upd1: have add hook 'use rvm' capistrano script, , return me 'rvm not function'. seems doesn't load bashrc/other init scripts.
upd2: yes, not load bash, when enable bash become worse. temporary solution disabled capistrano/assets. seems need wipe copy-pasted capistrano script , rewrite scratch.
when capistrano logs in - uses non-interactive shell — not load .bash_profile so, i've load bash default shell in deployment.rb:
default_run_options[:shell] = '/bin/bash'
and move rvm load script .bash_profile .bashrc
#.bash_profile source ~/.bashrc #.bashrc [[ -s "$home/.rvm/scripts/rvm" ]] && source "$home/.rvm/scripts/rvm" # load rvm shell session *as function*
Comments
Post a Comment