ruby on rails 4 - cap production deploy NoMethodError: undefined method `each' for "3w":String -
i'm trying deploy app server, keep getting error cant find solution for.
when run :
bundle exec cap production deploy --trace
the output :
** invoke production (first_time) ** execute production ** invoke load:defaults (first_time) ** execute load:defaults ** invoke bundler:map_bins (first_time) ** execute bundler:map_bins ** invoke deploy:set_rails_env (first_time) ** execute deploy:set_rails_env ** invoke deploy:set_linked_dirs (first_time) ** execute deploy:set_linked_dirs ** invoke deploy:set_rails_env ** invoke rbenv:validate (first_time) ** execute rbenv:validate ** invoke rbenv:map_bins (first_time) ** execute rbenv:map_bins ** invoke deploy (first_time) ** execute deploy ** invoke deploy:starting (first_time) ** execute deploy:starting ** invoke deploy:check (first_time) ** execute deploy:check ** invoke git:check (first_time) ** invoke git:wrapper (first_time) ** execute git:wrapper 00:00 git:wrapper 01 mkdir -p /tmp ✔ 01 deploy@server's-ip 0.587s uploading /tmp/git-ssh-myapp-production-root.sh 100.0% 02 chmod 700 /tmp/git-ssh-myapp-production-root.sh ✔ 02 deploy@server's-ip 0.112s ** execute git:check 00:00 git:check 01 git ls-remote --heads git@github.com:mygiuser/myapp.git 01 *********************************** refs/heads/master ✔ 01 deploy@server's-ip 3.695s ** invoke deploy:check:directories (first_time) ** execute deploy:check:directories 00:04 deploy:check:directories 01 mkdir -p /home/deploy/myapp/shared /home/deploy/myapp/releases ✔ 01 deploy@server's-ip 0.109s ** invoke deploy:check:linked_dirs (first_time) ** execute deploy:check:linked_dirs 00:04 deploy:check:linked_dirs 01 mkdir -p /home/deploy/myapp/shared/bin /home/deploy/myapp/shared/log /home/deploy/myapp/shared/tmp/pids /home/deploy/myapp/… ✔ 01 deploy@server's-ip 0.113s ** invoke deploy:check:make_linked_dirs (first_time) ** execute deploy:check:make_linked_dirs 00:04 deploy:check:make_linked_dirs 01 mkdir -p /home/deploy/myapp/shared/config ✔ 01 deploy@server's-ip 0.127s ** invoke deploy:check:linked_files (first_time) ** execute deploy:check:linked_files ** invoke deploy:set_previous_revision (first_time) ** execute deploy:set_previous_revision ** invoke deploy:started (first_time) ** execute deploy:started ** invoke deploy:updating (first_time) ** invoke deploy:new_release_path (first_time) ** execute deploy:new_release_path ** execute deploy:updating ** invoke git:create_release (first_time) ** invoke git:update (first_time) ** invoke git:clone (first_time) ** invoke git:wrapper ** execute git:clone 00:05 git:clone repository mirror @ /home/deploy/myapp/repo ** execute git:update 00:05 git:update 01 git remote update --prune 01 fetching origin ✔ 01 deploy@server's-ip 5.720s ** execute git:create_release 00:11 git:create_release 01 mkdir -p /home/deploy/myapp/releases/20161112203915 ✔ 01 deploy@server's-ip 0.115s 02 git archive master | tar -x -f - -c /home/deploy/myapp/releases/20161112203915 ✔ 02 deploy@server's-ip 0.140s ** invoke deploy:set_current_revision (first_time) ** execute deploy:set_current_revision ** invoke git:set_current_revision (first_time) ** execute git:set_current_revision 00:11 git:set_current_revision 01 echo "d081a7ed762d31da5a114b712b1ed8087898ccc2" >> revision ✔ 01 deploy@server's-ip 0.108s ** invoke deploy:symlink:shared (first_time) ** execute deploy:symlink:shared ** invoke deploy:symlink:linked_files (first_time) ** execute deploy:symlink:linked_files 00:12 deploy:symlink:linked_files 01 mkdir -p /home/deploy/myapp/releases/20161112203915/config ✔ 01 deploy@server's-ip 0.109s 02 rm /home/deploy/myapp/releases/20161112203915/config/database.yml ✔ 02 deploy@server's-ip 0.114s 03 ln -s /home/deploy/myapp/shared/config/database.yml /home/deploy/myapp/releases/20161112203915/config/database.yml ✔ 03 deploy@server's-ip 0.113s ** invoke deploy:symlink:linked_dirs (first_time) ** execute deploy:symlink:linked_dirs 00:12 deploy:symlink:linked_dirs 01 mkdir -p /home/deploy/myapp/releases/20161112203915 /home/deploy/myapp/releases/20161112203915/tmp /home/deploy/myapp/releases/… ✔ 01 deploy@server's-ip 0.103s 02 rm -rf /home/deploy/myapp/releases/20161112203915/bin ✔ 02 deploy@server's-ip 0.107s 03 ln -s /home/deploy/myapp/shared/bin /home/deploy/myapp/releases/20161112203915/bin ✔ 03 deploy@server's-ip 0.104s 04 rm -rf /home/deploy/myapp/releases/20161112203915/log ✔ 04 deploy@server's-ip 0.115s 05 ln -s /home/deploy/myapp/shared/log /home/deploy/myapp/releases/20161112203915/log ✔ 05 deploy@server's-ip 0.134s 06 ln -s /home/deploy/myapp/shared/tmp/pids /home/deploy/myapp/releases/20161112203915/tmp/pids ✔ 06 deploy@server's-ip 0.132s 07 ln -s /home/deploy/myapp/shared/tmp/cache /home/deploy/myapp/releases/20161112203915/tmp/cache ✔ 07 deploy@server's-ip 0.108s 08 ln -s /home/deploy/myapp/shared/tmp/sockets /home/deploy/myapp/releases/20161112203915/tmp/sockets ✔ 08 deploy@server's-ip 0.108s 09 ln -s /home/deploy/myapp/shared/vendor/bundle /home/deploy/myapp/releases/20161112203915/vendor/bundle ✔ 09 deploy@server's-ip 0.111s 10 ln -s /home/deploy/myapp/shared/public/system /home/deploy/myapp/releases/20161112203915/public/system ✔ 10 deploy@server's-ip 0.116s 11 ln -s /home/deploy/myapp/shared/public/assets /home/deploy/myapp/releases/20161112203915/public/assets ✔ 11 deploy@server's-ip 0.115s ** invoke deploy:updated (first_time) ** invoke bundler:install (first_time) ** execute bundler:install 00:15 bundler:install 01 $home/.rbenv/bin/rbenv exec bundle install --path /home/deploy/myapp/shared/bundle --without development test --deployment --quiet ✔ 01 deploy@server's-ip 1.179s ** execute deploy:updated ** invoke deploy:compile_assets (first_time) ** invoke deploy:set_rails_env ** execute deploy:compile_assets ** invoke deploy:assets:precompile (first_time) ** execute deploy:assets:precompile 00:17 deploy:assets:precompile 01 $home/.rbenv/bin/rbenv exec bundle exec rake assets:precompile 01 rake aborted! 01 nomethoderror: undefined method `each' "3w":string 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/connection_specification.rb:1… 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_handling.rb:69:in `resolve' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/core.rb:46:in `configurations=' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:117:in `block (2 levels) in <class:rai… 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `each' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `on_load' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:116:in `block in <class:railtie>' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!' 01 /home/deploy/myapp/releases/20161112203915/config/environment.rb:5:in `<top (required)>' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define' 01 /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>' 01 /home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `load' 01 /home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `<main>' 01 tasks: top => environment 01 (see full trace running task --trace) cap aborted! sshkit::runner::executeerror: exception while executing deploy@server's-ip: rake exit status: 1 rake stdout: nothing written rake stderr: rake aborted! nomethoderror: undefined method `each' "3w":string /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/connection_specification.rb:150:in `resolve_all' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_handling.rb:69:in `resolve' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/core.rb:46:in `configurations=' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:117:in `block (2 levels) in <class:railtie>' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `each' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `on_load' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:116:in `block in <class:railtie>' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!' /home/deploy/myapp/releases/20161112203915/config/environment.rb:5:in `<top (required)>' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>' /home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `load' /home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `<main>' tasks: top => environment (see full trace running task --trace) /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute' sshkit::command::failed: rake exit status: 1 rake stdout: nothing written rake stderr: rake aborted! nomethoderror: undefined method `each' "3w":string /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/connection_specification.rb:150:in `resolve_all' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_handling.rb:69:in `resolve' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/core.rb:46:in `configurations=' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:117:in `block (2 levels) in <class:railtie>' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `each' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `on_load' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:116:in `block in <class:railtie>' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!' /home/deploy/myapp/releases/20161112203915/config/environment.rb:5:in `<top (required)>' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>' /home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `load' /home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `<main>' tasks: top => environment (see full trace running task --trace) /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/command.rb:100:in `exit_status=' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/backends/netssh.rb:148:in `execute_command' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/backends/abstract.rb:141:in `tap' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/backends/abstract.rb:74:in `execute' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/capistrano-rails-1.1.8/lib/capistrano/tasks/assets.rake:69:in `block (6 levels) in <top (required)>' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/backends/abstract.rb:93:in `with' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/capistrano-rails-1.1.8/lib/capistrano/tasks/assets.rake:68:in `block (5 levels) in <top (required)>' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/backends/abstract.rb:85:in `within' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/capistrano-rails-1.1.8/lib/capistrano/tasks/assets.rake:67:in `block (4 levels) in <top (required)>' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/backends/abstract.rb:29:in `instance_exec' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/backends/abstract.rb:29:in `run' /home/sol/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/sshkit-1.11.4/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' tasks: top => deploy:assets:precompile deploy has failed error: exception while executing deploy@server's-ip: rake exit status: 1 rake stdout: nothing written rake stderr: rake aborted! nomethoderror: undefined method `each' "3w":string /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/connection_specification.rb:150:in `resolve_all' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/connection_handling.rb:69:in `resolve' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/core.rb:46:in `configurations=' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:117:in `block (2 levels) in <class:railtie>' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `each' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/lazy_load_hooks.rb:27:in `on_load' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:116:in `block in <class:railtie>' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!' /home/deploy/myapp/releases/20161112203915/config/environment.rb:5:in `<top (required)>' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>' /home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `load' /home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `<main>' tasks: top => environment (see full trace running task --trace) ** invoke deploy:failed (first_time) ** execute deploy:failed ** deploy failed ** refer log/capistrano.log details. here last 20 lines: /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/railtie.rb:116:in `block in <class:railtie>' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!' /home/deploy/myapp/releases/20161112203915/config/environment.rb:5:in `<top (required)>' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:457:in `block in run_tasks_blocks' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define' /home/deploy/myapp/shared/bundle/ruby/2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>' /home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `load' /home/deploy/.rbenv/versions/2.3.1/bin/bundle:23:in `<main>' debug [dfeef303] tasks: top => environment debug [dfeef303] (see full trace running task --trace)
my capfile
require 'capistrano/setup' require 'capistrano/deploy' require 'capistrano/bundler' require 'capistrano/spree' require 'capistrano/rails' require 'capistrano/rbenv' set :rbenv_type, :user # or :system, depends on rbenv setup set :rbenv_ruby, '2.3.1' dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }
deploy.rb:
# config valid capistrano 3.1 lock '3.6.1' set :application, 'myapp' set :repo_url, 'git@github.com:mygituser/myapp.git' set :deploy_to, '/home/deploy/myapp' set :linked_files, %w{config/database.yml} set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system} set :ssh_options, {:forward_agent => true} set :use_sudo, false #default_run_options[:shell] = '/bin/bash --login' #default_environment["rails_env"] = 'production' namespace :deploy desc 'restart application' task :restart on roles(:app), in: :sequence, wait: 5 execute :touch, release_path.join('tmp/restart.txt') end end after 'deploy:updated', 'deface:precompile' after :publishing, 'deploy:restart' after :finishing, 'deploy:cleanup' end
anyone encountered error before ? or knows how fix ?
update : database.yml:
default: &default adapter: mysql2 encoding: utf8 collation: utf8_general_ci pool: 5 username: myusername password: mypassword socket: /var/run/mysqld/mysqld.sock development: <<: *default database: myapp_development test: <<: *default database: myapp_test production: <<: *default database: myapp_production username: myapp password: <%= env['myapp_database_password'] %>
gemfile :
source 'https://rubygems.org' gem 'rails', '4.2.6' gem 'mysql2', '>= 0.3.13', '< 0.5' gem 'sass-rails', '~> 5.0' gem 'uglifier', '>= 1.3.0' gem 'coffee-rails', '~> 4.1.0' # gem 'therubyracer', platforms: :ruby gem 'jquery-rails' gem 'turbolinks' gem 'jbuilder', '~> 2.0' gem 'sdoc', '~> 0.4.0', group: :doc # gem 'bcrypt', '~> 3.1.7' gem 'spree', '~> 3.1.0' gem 'spree_auth_devise', '~> 3.1.0' gem 'spree_gateway', '~> 3.1.0' gem 'unicorn' group :development gem 'web-console', '~>2.3.0' gem 'byebug' ,'~>9.0.6' gem 'spring' ,'~>1.2.0' gem 'debug_inspector' ,'~>0.0.2' gem 'binding_of_caller' ,'~>0.7.2' end group :development, :production gem "capistrano", "~> 3.6" gem 'capistrano-bundler', '~> 1.1.2' gem 'capistrano-rails', '~> 1.1.1' gem 'capistrano-rbenv', github: "capistrano/rbenv" gem 'capistrano-spree', '~> 1.0.0' gem 'capistrano-passenger', require: false, github: 'capistrano/passenger' end group :production gem 'therubyracer' gem 'execjs' end
i fixed main error removing database.yml linked files settings , .gitignore , create on server .
Comments
Post a Comment