我正在尝试将Rails应用程序部署到CentOS 6/nginx/passenger服务器,但是cap部署:冷却给我一个错误.以下是部署输出的相关部分:
* 2013-03-31 17:49:59 executing `deploy:assets:update_asset_mtimes'
* executing "[ -e /home/appuser/apps/britaincares/shared/assets/manifest.yml ] && cat /home/appuser/apps/britaincares/shared/assets/manifest.yml || echo"
servers: ["www.britaincares.co.uk"]
[www.britaincares.co.uk] executing command
command finished in 303ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/appuser/apps/britaincares/releases/20130331164733; true"
servers: ["www.britaincares.co.uk"]
[www.britaincares.co.uk] executing command
** [out :: www.britaincares.co.uk] /home/appuser/.bashrc: eval: line 26: syntax error: unexpected end of file
command finished in 932ms
/Users/chriswickett/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): mapping values are not allowed in this context at line 1 column 28 (Psych::SyntaxError)
from /Users/chriswickett/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:203:in `parse_stream' …
Run Code Online (Sandbox Code Playgroud) 我有一个Capistrano部署脚本已经工作了一段时间,但现在它在部署时抛出了这样的错误:
/Users/lifecoder/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): control characters are not allowed at line 1 column 1 (Psych::SyntaxError)
from /Users/lifecoder/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
from /Users/lifecoder/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/psych.rb:151:in `parse'
from /Users/lifecoder/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/psych.rb:127:in `load'
...
Run Code Online (Sandbox Code Playgroud)
它在部署期间还会抛出几个警告:
** [out :: test.domain] Warning! PATH is not properly set up, '/home/lifecoder/.rvm/gems/ruby-1.9.3-p448/bin' is not at first place,
** [out :: test.domain]
** [out :: test.domain] usually this is caused by shell initialization files - check them for 'PATH=...' entries,
** [out :: test.domain]
** [out :: test.domain] to fix run: 'rvm use ruby-1.9.3-p448'.
Run Code Online (Sandbox Code Playgroud)
我在 …
请看下面的错误(第1行第1列(Psych :: SyntaxError)不允许使用控制字符)并帮我解决它.当我尝试在ubuntu 12.10 ruby上运行命令"cap deploy:migrations"时出现错误1.9.3 Rails 3.2.0.有用于部署的本地Apache服务器.
我在stackoverflow上尝试了不同的解决方案,但没有人解决问题.
提前致谢
----------------------------------------
Error Detail:
----------------------------------------
imran@IJM:~/development/work/depot$ cap deploy:migrations
triggering load callbacks
* 2013-09-06 11:43:13 executing `deploy:migrations'
* 2013-09-06 11:43:13 executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote imran@IJM:git/depot.git master"
command finished in 359ms
.......
.......
* executing "[ -e /home/imran/IJM/shared/assets/manifest* ] && cat /home/imran/IJM/shared/assets/manifest* || echo"
servers: ["IJM"]
[IJM] executing command
command finished in 822ms
/home/imran/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): control characters are not allowed at line 1 …
Run Code Online (Sandbox Code Playgroud)