2016-11-04 18 views
6

tôi nhận được lỗi sau khi cố gắng triển khai sử dụng capistranoPsych Cú pháp lỗi khi triển khai sử dụng capistrano

sản xuất nắp triển khai

[whenever:update_crontab] rolling back 
    * executing "ls -x /home/appuser/app_assets_production/releases" 
    servers: ["10.1.171.106"] 
    [10.1.171.106] executing command 
    command finished in 3450ms 
    * executing "cd /home/appuser/app_assets_production/releases/20161103140152 && RAILS_ENV=production bundle exec whenever --update-crontab app_assets --set environment=production --roles db" 
    servers: ["10.1.171.106"] 
    [10.1.171.106] executing command 
** [out :: 10.1.171.106] Using /home/appuser/.rvm/gems/ruby-2.1.2 
** [out :: 10.1.171.106] [write] crontab file updated 
    command finished in 11877ms 
*** [deploy:update_code] rolling back 
    * executing "rm -rf /home/appuser/app_assets_production/releases/20161104113421; true" 
    servers: ["10.1.171.106"] 
    [10.1.171.106] executing command 
** [out :: 10.1.171.106] Using /home/appuser/.rvm/gems/ruby-2.1.2 
    command finished in 3256ms 
/home/manoj/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/psych.rb:371:in `parse': (<unknown>): control characters are not allowed at line 1 column 1 (Psych::SyntaxError) 
    from /home/manoj/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/psych.rb:371:in `parse_stream' 
    from /home/manoj/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/psych.rb:318:in `parse' 
    from /home/manoj/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/psych.rb:245:in `load' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/recipes/deploy/assets.rb:63:in `block (3 levels) in load' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `instance_eval' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:89:in `execute_task' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/callback.rb:38:in `call' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `block in trigger' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `each' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `trigger' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:23:in `invoke_task_directly_with_callbacks' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:89:in `execute_task' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/callback.rb:38:in `call' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `block in trigger' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `each' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `trigger' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:89:in `execute_task' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/namespaces.rb:191:in `method_missing' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/recipes/deploy.rb:229:in `block (3 levels) in load' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:56:in `transaction' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/namespaces.rb:191:in `method_missing' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/recipes/deploy.rb:228:in `block (2 levels) in load' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `instance_eval' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:89:in `execute_task' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/namespaces.rb:191:in `method_missing' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/recipes/deploy.rb:196:in `block (2 levels) in load' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `instance_eval' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:89:in `execute_task' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:45:in `each' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:34:in `execute!' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:14:in `execute' 
    from /home/manoj/.rvm/gems/[email protected]_assets/gems/capistrano-2.14.2/bin/cap:4:in `<top (required)>' 
    from /home/manoj/.rvm/gems/[email protected]_assets/bin/cap:23:in `load' 
    from /home/manoj/.rvm/gems/[email protected]_assets/bin/cap:23:in `<main>' 
    from /home/manoj/.rvm/gems/[email protected]_assets/bin/ruby_executable_hooks:15:in `eval' 
    from /home/manoj/.rvm/gems/[email protected]_assets/bin/ruby_executable_hooks:15:in `<main>' 

tôi đã làm một số tìm kiếm và thử như sau

  1. tôi đã cố gắng để thêm sau đây trong boot.rb, sau đó config/deploy.rb tập tin, Nó đã không làm việc.
require 'yaml' 
YAML::ENGINE.yamler = 'syck' 
  1. tôi đã cố gắng loại bỏ manifest.yml và tập tin asset_manifest.yml, sau đó cố gắng để triển khai một lần nữa. Nó không hoạt động

  2. Tôi đã kiểm tra tệp .bashrc và không có lỗi cú pháp.

Vui lòng giúp đỡ nếu bạn tìm thấy những gì tôi thiếu ở đây.

Trả lời

1

Đã xảy ra lỗi trong tệp ~/.bashrc của tôi, đang tải phiên bản Ruby cũ.

Có en lỗi khi tôi xem rvm list

default [usr/bin missing ruby] 
ruby-2.1.2 

tôi loại bỏ 'default' thư mục của tôi từ ~/.rvm/rubies/ sau đó giao 'ruby-2.1.2' như ruby ​​mặc định sử dụng rvm use ruby-2.1.2 --default và vấn đề đã được giải quyết.

Các vấn đề liên quan