Capistrano deployment failing - ruby-on-rails

Im having some problems getting capistrano to deploy.
As far as i can tell the fail happens with the git ls-remote command, but when i run it on the server manually it returns successfully.
Any help would be greatly appreciated!
SOLVED
After installing mountain lion my git cli wasn't working.
cap deploy
triggering load callbacks
* 15:55:49 == Currently executing `staging'
triggering start callbacks for `deploy'
* 15:55:49 == Currently executing `multistage:ensure'
* 15:55:49 == Currently executing `deploy'
* 15:55:49 == Currently executing `deploy:update'
** transaction: start
* 15:55:49 == Currently executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git#github.com:taheilo/taheilo.com.git master"
*** [deploy:update_code] rolling back
* executing "rm -rf /home/frankie/sites/taheilo.com/stage/releases/20120726135550; true"
servers: ["198.101.205.147"]
[198.101.205.147] executing command
command finished in 2039ms
/Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy.rb:107:in ``': No such file or directory - git ls-remote git#github.com:taheilo/taheilo.com.git master (Errno::ENOENT)
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy.rb:107:in `block in run_locally'
from /Users/frankie/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy.rb:106:in `run_locally'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy.rb:44:in `block (3 levels) in load'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy.rb:96:in `with_env'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy.rb:44:in `block (2 levels) in load'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy/scm/git.rb:227:in `query_revision'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in `block in method_missing'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy/scm/base.rb:63:in `local'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in `method_missing'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy.rb:44:in `block in load'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/variables.rb:87:in `call'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/variables.rb:87:in `block in fetch'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/variables.rb:110:in `block in protect'
from <internal:prelude>:10:in `synchronize'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/variables.rb:110:in `protect'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/variables.rb:78:in `fetch'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/variables.rb:95:in `[]'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy/strategy/base.rb:82:in `revision'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy/strategy/remote_cache.rb:35:in `update_repository_cache'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy/strategy/remote_cache.rb:15:in `deploy!'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy.rb:222:in `block (2 levels) in load'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/namespaces.rb:193:in `method_missing'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy.rb:203:in `block (3 levels) in load'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/execution.rb:56:in `transaction'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/namespaces.rb:193:in `method_missing'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy.rb:202:in `block (2 levels) in load'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/namespaces.rb:193:in `method_missing'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/recipes/deploy.rb:170:in `block (2 levels) in load'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/cli/execute.rb:45:in `each'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/cli/execute.rb:34:in `execute!'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/lib/capistrano/cli/execute.rb:14:in `execute'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/gems/capistrano-2.12.0/bin/cap:4:in `<top (required)>'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/bin/cap:19:in `load'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/bin/cap:19:in `<main>'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/frankie/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'

you should try to execute it locally as capistrano says:
executing locally: "git ls-remote git#github.com:taheilo/taheilo.com.git master"

Related

Cap deploy failing on precompile assets but cap <env> deploy:precompile:assets works

I removed and then re-added a few files to github so that the gitignore would work, and then uploaded these files through capistrano to server.
Then started having some deploy trouble failing on precompile:assets.
I was able to find the issue, fix and now cap env deploy:precompile:assets gives me all green. But when I run cap env deploy I am still getting:
Traceback (most recent call last):
1: from /Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as deploy#staging.myapp.com: Connection reset by peer - recvfrom(2) (SSHKit::Runner::ExecuteError)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy#staging.myapp.com: Connection reset by peer - recvfrom(2)
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
Caused by:
Errno::ECONNRESET: Connection reset by peer - recvfrom(2)
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/buffered_io.rb:66:in `recv'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/buffered_io.rb:66:in `fill'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:275:in `block in ev_do_handle_events'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:271:in `each'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:271:in `ev_do_handle_events'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:112:in `ev_select_and_postprocess'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:31:in `process'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:228:in `process'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `block in loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/channel.rb:272:in `wait'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:163:in `block (2 levels) in execute_command'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/channel.rb:533:in `do_open_confirmation'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:644:in `channel_open_confirmation'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:549:in `dispatch_incoming_packets'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:249:in `ev_preprocess'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:101:in `each'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:101:in `ev_preprocess'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/event_loop.rb:29:in `process'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:228:in `process'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `block in loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/net-ssh-5.2.0/lib/net/ssh/connection/session.rb:181:in `loop'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:165:in `block in execute_command'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/connection_pool.rb:65:in `with'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:176:in `with_ssh'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:129:in `execute_command'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `block in create_command_and_execute'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `tap'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `create_command_and_execute'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:78:in `execute'
/Users/user/.rvm/gems/ruby-2.5.1/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:69:in `block (6 levels) in <top (required)>'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:97:in `with'
/Users/user/.rvm/gems/ruby-2.5.1/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:68:in `block (5 levels) in <top (required)>'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:89:in `within'
/Users/user/.rvm/gems/ruby-2.5.1/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:67:in `block (4 levels) in <top (required)>'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `run'
/Users/user/.rvm/gems/ruby-2.5.1/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
Tasks: TOP => deploy:assets:precompile
The deploy has failed with an error: Exception while executing as deploy#staging.myapp.com: Connection reset by peer - recvfrom(2)
** Invoke deploy:failed (first_time)
** Execute deploy:failed
** DEPLOY FAILED
Unsure how to troubleshoot since the task seems to work, and I can definitely connect to the server (uploaded files through cap etc...)
Thanks for any tips

Capistrano deployment failing on assets:precompile

I have been using capistrano 3 for my rails app for sometime. Today it started failing at assets precompilation step with the following on logs that aren't very helpful:
On the server I have
node 10.12.0
yarn 1.10.1
rails 5.1.6
ruby 2.5.1
rbenv 1.1.1
Caused by:
PrecompileRequired: PrecompileRequired
Caused by:
SSHKit::Command::Failed: ls exit status: 2
ls stdout: ls: cannot access '/var/www/bubblin.io/releases/20181020142819/assets_manifest_backup': No such file or directory
ls stderr: Nothing written
Tasks: TOP => deploy:assets:precompile
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as marvin#bubblin.io: rake exit status: 1
rake stdout: Yarn executable was not detected in the system.
Download Yarn at https://yarnpkg.com/en/docs/install
rake aborted!
Autoprefixer doesn’t support Node v5.4.1. Update it.
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/autoprefixer-rails-9.2.1/lib/autoprefixer-rails/processor.rb:163:in `runtime'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/autoprefixer-rails-9.2.1/lib/autoprefixer-rails/processor.rb:37:in `process'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/autoprefixer-rails-9.2.1/lib/autoprefixer-rails/sprockets.rb:20:in `run'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/autoprefixer-rails-9.2.1/lib/autoprefixer-rails/sprockets.rb:14:in `call'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23:in `block in call'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200:in `dfs'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24:in `call'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/context.rb:99:in `load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/context.rb:129:in `depend_on_asset'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/context.rb:160:in `link_asset'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/context.rb:27:in `compute_asset_path'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/actionview-5.1.6/lib/action_view/helpers/asset_url_helper.rb:198:in `asset_path'
/var/www/bubblin.io/releases/20181020145802/app/assets/javascripts/serviceworkers/sw.js.erb:60:in `_evaluate_template'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/erb_processor.rb:26:in `call'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/erb_processor.rb:13:in `call'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:23:in `block in call'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/utils.rb:200:in `dfs'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/bundle.rb:24:in `call'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:134:in `block in find'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in `each'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in `find'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/home/marvin/.rbenv/versions/2.5.1/bin/bundle:23:in `load'
/home/marvin/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
rake stderr: Nothing written
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:134:in `block in find'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in `each'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:133:in `find'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
/var/www/bubblin.io/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/var/w
DEBUG [709144dc] ww/bubblin.io/shared/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/home/marvin/.rbenv/versions/2.5.1/bin/bundle:23:in `load'
/home/marvin/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
Edit: My yarn.lock file looks like so:
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
Actually, I don't use yarn for anything--was putting up with it because Rails decided to use it by default. I'll be happy we can remove it forever and have the error above be gone with it.
Looks like you don't have yarn installed in your deployment server. Did you already installed it? If not, try this command before a new deploy:
npm install yarn -g

`block (2 levels) in load' exception when running capistrano

Yesterday an unwelcomed visitor was mucking around my server. I since rebooted ubuntu and changed passwords. Now I try to deploy my rails application and I am getting an error.
Here is the important part:
** [out :: 172.27.12.xxx] /usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby /usr/local/rvm/gems/ruby-1.9.3-p392/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
** [out :: 172.27.12.xxx] /usr/local/rvm/rubies/ruby-1.9.3-p327/bin/ruby /usr/local/rvm/gems/ruby-1.9.3-p327/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
** [out :: 172.27.12.xxx] /usr/local/rvm/rubies/ruby-1.9.3-p327/bin/ruby /usr/local/rvm/gems/ruby-1.9.3-p327#global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
*** [deploy:update_code] rolling back
* executing "rm -rf /home/guarddog/public_html/guarddog.com/releases/20131220150214; true"
servers: ["172.27.12.xxx", "172.27.12.xxx", "172.27.12.xxx"]
** [deploy:update_code] exception while rolling back: IOError, closed stream
This is stack trace of error:
Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.6.2/lib/net/ssh/buffered_io.rb:65:in `recv': Operation timed out - recvfrom(2) (Errno::ETIMEDOUT)
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.6.2/lib/net/ssh/buffered_io.rb:65:in `fill'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.6.2/lib/net/ssh/connection/session.rb:228:in `block in postprocess'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.6.2/lib/net/ssh/connection/session.rb:224:in `each'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/net-ssh-2.6.2/lib/net/ssh/connection/session.rb:224:in `postprocess'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/processable.rb:31:in `block in process_iteration'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/processable.rb:43:in `block in ensure_each_session'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/processable.rb:41:in `each'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/processable.rb:41:in `ensure_each_session'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/processable.rb:29:in `process_iteration'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/command.rb:165:in `block (2 levels) in process!'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/command.rb:164:in `loop'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/command.rb:164:in `block in process!'
from /Users/guarddog/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/command.rb:163:in `process!'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/command.rb:134:in `process'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/actions/invocation.rb:185:in `block in run_tree'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/connections.rb:198:in `block in execute_on_servers'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/connections.rb:186:in `each'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/connections.rb:186:in `each_slice'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/connections.rb:186:in `execute_on_servers'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/actions/invocation.rb:183:in `run_tree'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/actions/invocation.rb:155:in `run'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from ./config/deploy.rb:77:in `block (2 levels) in load'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/callback.rb:38:in `call'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:141:in `block in trigger'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:141:in `each'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:141:in `trigger'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/recipes/deploy.rb:228:in `block (3 levels) in load'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:56:in `transaction'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/recipes/deploy.rb:227:in `block (2 levels) in load'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/recipes/deploy.rb:195:in `block (2 levels) in load'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:45:in `each'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:34:in `execute!'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/lib/capistrano/cli/execute.rb:14:in `execute'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/gems/capistrano-2.13.5/bin/cap:4:in `<top (required)>'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/bin/cap:19:in `load'
from /Users/guarddog/.rvm/gems/ruby-1.9.3-p0/bin/cap:19:in `<main>'
I think the notable part is this line:
from ./config/deploy.rb:77:in `block (2 levels) in load'
That's actual code in my deploy.rb file:
task :precompile, :role => :app do
run "cd #{release_path}/ && RAILS_ENV=production bundle exec rake assets:precompile"
end
which is executed because of this line in my deploy.rb:
after "deploy:update_code", "deploy:precompile"
Note the deploys were working fine until the incident happened yesterday. He seemed to clone the git repository and copy it somewhere. But he didn't seem to delete any files.
Any idea why deploy:precompile gives the error?
It sounds like your remote codebase may have been compromised. I suggest using
cap deploy:check
cap deploy:cleanup
cap deploy:cold
to redeploy a fresh copy of your original codebase.
This will not modify your remote database, but it will restart the remote httpd server so, as with any deploy, you should wait until a suitable maintenance window to try it.

psych.rb error when deploying with Capistrano 'mapping not allowed in this context'

I'm trying to deploy a Rails app to a CentOS 6/nginx/passenger server, but cap deploy:cold is giving me an error. Here's the relevant part from deployment output:
* 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'
from /Users/chriswickett/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:151:in `parse'
from /Users/chriswickett/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:127:in `load'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/recipes/deploy/assets.rb:63:in `block (3 levels) in load'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/callback.rb:38:in `call'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `block in trigger'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `each'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `trigger'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:23:in `invoke_task_directly_with_callbacks'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/callback.rb:38:in `call'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `block in trigger'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `each'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:141:in `trigger'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/recipes/deploy.rb:229:in `block (3 levels) in load'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:56:in `transaction'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/recipes/deploy.rb:228:in `block (2 levels) in load'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/recipes/deploy.rb:517:in `block (2 levels) in load'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `instance_eval'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:138:in `invoke_task_directly'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:45:in `each'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:34:in `execute!'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/lib/capistrano/cli/execute.rb:14:in `execute'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/gems/capistrano-2.14.2/bin/cap:4:in `<top (required)>'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374/bin/cap:19:in `load'
from /Users/chriswickett/.rvm/gems/ruby-1.9.3-p374
Rails 3.2.1.
The manifest.yml file mentioned contains 'jquery.min.map' - is that what the 'mapping not allowed' part is referring to? If so, I can't work out how to stop jQuery trying to include this map file.
I've tried putting that contexts of the manifest.yml file through various online validators - it's coming up fine. No missing spaces or tabs as far as I can see.
Thanks!
I had this issue and deleted my .json manifest files under myapp/shared/assets, as suggested here (actually, they suggested renaming them, but that didn't work for me).
I solved this. Psych was being called because the file in Capistrano's deploy/assets.rb uses YAML.load.
The variable it was loading was a 'capture' of a command line cat command, and because my .bashrc had a syntax error in it, it was capturing the output of that error and passing it to YAML.load, too. Fixed .bashrc error and all is good!

Ruby on Rails 3 JSON Error

I am trying to deploy to vexxhost with capistrano and this is what I get at the final step of the deployment process:
command finished in 344ms
** transaction: commit
* executing `deploy:restart'
/Users/kleon/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/json/common.rb:148:in `parse': 743: unexpected token at 'gem 'unicorn', '4.1.1' (JSON::ParserError)
{"cpanelresult":{"data":[{"status":1,"statusmsg":"restart ok"}],"event":{"result":1},"module":"RoR","apiversion":2,"func":"restartapp"}}
'
from /Users/kleon/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/json/common.rb:148:in `parse'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-vexxhost-1.0.0/lib/capistrano-vexxhost/capistrano_integration.rb:118:in `block in cpanel_api2_command'
from /Users/kleon/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:745:in `start'
from /Users/kleon/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/net/http.rb:557:in `start'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-vexxhost-1.0.0/lib/capistrano-vexxhost/capistrano_integration.rb:114:in `cpanel_api2_command'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-vexxhost-1.0.0/lib/capistrano-vexxhost/capistrano_integration.rb:69:in `block (3 levels) in <top (required)>'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/namespaces.rb:191:in `method_missing'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/namespaces.rb:110:in `block in define_task'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/recipes/deploy.rb:171:in `block (2 levels) in load'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/callbacks.rb:25:in `invoke_task_directly_with_callbacks'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:45:in `each'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:34:in `execute!'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/lib/capistrano/cli/execute.rb:14:in `execute'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/gems/capistrano-2.11.2/bin/cap:4:in `<top (required)>'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/bin/cap:19:in `load'
from /Users/kleon/.rvm/gems/ruby-1.9.3-p0#rails3_atlnetsolutions/bin/cap:19:in `<main>'

Resources