LoadError: incompatible library version, when deploying with capistrano to Digital Ocean - ruby-on-rails

When I run cap staging deploy, I get the error
LoadError: incompatible library version - /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack/ms…
Assets won't precompile when deploying with capistrano to production on Amazon EC2. But I didn't find any solution there.
00:42 deploy:assets:precompile
01 bundle exec rake assets:precompile
01 rake aborted!
01 LoadError: incompatible library version - /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack/ms…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:11:in `require'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:11:in `rescue in <top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:8:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `require'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `block in <to…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:43:in `rescue in with_g…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:39:in `with_gems'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `<top (requir…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `require'
01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `require_relative'
01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `require_relative'
01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
01 /usr/local/bin/bundle:23:in `load'
01 /usr/local/bin/bundle:23:in `<main>'
01
01 Caused by:
01 LoadError: cannot load such file -- msgpack/2.6/msgpack
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:9:in `require'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:9:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `require'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `block in <to…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:43:in `rescue in with_g…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:39:in `with_gems'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `<top (requir…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `require'
01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `require_relative'
01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `require_relative'
01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
01 /usr/local/bin/bundle:23:in `load'
01 /usr/local/bin/bundle:23:in `<main>'
01
01 Caused by:
01 LoadError: incompatible library version - /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack/ms…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:11:in `require'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:11:in `rescue in <top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:8:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `require'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `block in <to…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:40:in `with_gems'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `<top (requir…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `require'
01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `require_relative'
01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `require_relative'
01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
01 /usr/local/bin/bundle:23:in `load'
01 /usr/local/bin/bundle:23:in `<main>'
01
01 Caused by:
01 LoadError: cannot load such file -- msgpack/2.6/msgpack
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:9:in `require'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/msgpack-1.2.10/lib/msgpack.rb:9:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `require'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `block in <to…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/explicit_require.rb:40:in `with_gems'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/store.rb:3:in `<top (requir…
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap.rb:3:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `require_relative'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.4/lib/bootsnap/setup.rb:1:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `require'
01 /var/www/dbname_staging/releases/20190514174408/config/boot.rb:6:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `require_relative'
01 /var/www/dbname_staging/releases/20190514174408/config/application.rb:3:in `<top (required)>'
01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `require_relative'
01 /var/www/dbname_staging/releases/20190514174408/Rakefile:6:in `<top (required)>'
01 /var/www/dbname_staging/shared/bundle/ruby/2.6.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
01 /usr/local/bin/bundle:23:in `load'
01 /usr/local/bin/bundle:23:in `<main>'
01 (See full trace by running task with --trace)
#<Thread:0x00005581529e8788#/home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
13: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
12: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `run'
11: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
10: from /home/compname/.rvm/gems/ruby-2.6.3/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:67:in `block (4 levels) in <top (required)>'
9: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:89:in `within'
8: from /home/compname/.rvm/gems/ruby-2.6.3/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:68:in `block (5 levels) in <top (required)>'
7: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:97:in `with'
6: from /home/compname/.rvm/gems/ruby-2.6.3/gems/capistrano-rails-1.4.0/lib/capistrano/tasks/assets.rake:69:in `block (6 levels) in <top (required)>'
5: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:78:in `execute'
4: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `create_command_and_execute'
3: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `tap'
2: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/abstract.rb:145:in `block in create_command_and_execute'
1: from /home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/backends/netssh.rb:169:in `execute_command'
/home/compname/.rvm/gems/ruby-2.6.3/gems/sshkit-1.18.2/lib/sshkit/command.rb:99:in `exit_status=': rake exit status: 1 (SSHKit::Command::Failed)
rake stdout: Nothing written
rake stderr: rake aborted!

Related

rake routes --- LoadError: incompatible library version

Any advice on how to fix this?
sms-MacBook-Air:myappsm$ rake routes
rake aborted!
LoadError: incompatible library version - /Users/sm/.rvm/gems/ruby-2.6.1/gems/msgpack-1.2.6/lib/msgpack/msgpack.bundle
/Users/sm/.rvm/gems/ruby-2.6.1/gems/msgpack-1.2.6/lib/msgpack.rb:11:in `require'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/msgpack-1.2.6/lib/msgpack.rb:11:in `rescue in <top (required)>'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/msgpack-1.2.6/lib/msgpack.rb:8:in `<top (required)>'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/store.rb:3:in `require'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/store.rb:3:in `block in <top (required)>'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.3.2/lib/bootsnap/explicit_require.rb:43:in `rescue in with_gems'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.3.2/lib/bootsnap/explicit_require.rb:39:in `with_gems'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/store.rb:3:in `<top (required)>'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache.rb:55:in `require_relative'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache.rb:55:in `<top (required)>'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.3.2/lib/bootsnap.rb:3:in `require_relative'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.3.2/lib/bootsnap.rb:3:in `<top (required)>'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.3.2/lib/bootsnap/setup.rb:1:in `require_relative'
/Users/sm/.rvm/gems/ruby-2.6.1/gems/bootsnap-1.3.2/lib/bootsnap/setup.rb:1:in `<top (required)>'
/Users/sm/myapp/config/boot.rb:4:in `require'
/Users/sm/myapp/config/boot.rb:4:in `<top (required)>'
/Users/sm/myapp/config/application.rb:1:in `require_relative'
/Users/sm/myapp/config/application.rb:1:in `<top (required)>'
/Users/sm/myapp/Rakefile:4:in `require_relative'
/Users/sm/myapp/Rakefile:4:in `<top (required)>'
/Users/sm/.rvm/rubies/ruby-2.6.1/lib/ruby/gems/2.6.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'

NoMethodError: undefined method `symbolize_keys' for nil:NilClass

while deploying rails application to production server.
capistrano unable to load following file from confing
server_options = YAML.load_file(File.join(Rails.root, "config", "server.yml"))[Rails.env].symbolize_keys
I have created the following files manually on server
config/database.yml
config/aws.yml
config/cable.yml
config/email.yml
config/secrets.yml
config/server.yml
config/application.yml
Because these are in .gitignore
# add sensitive files to .gitignore
config/database.yml
config/aws.yml
config/cable.yml
config/email.yml
config/secrets.yml
config/server.yml
config/application.yml
Here is the symlinking part of capistrano in deploy.rb
files we want symlinking to specific entries in shared.
set :linked_files, %w{config/database.yml config/aws.yml config/cable.yml config/email.yml config/secrets.yml config/server.yml config/application.yml}
# dirs we want symlinking to shared
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system public/pdf public/excel public/img}
# what specs should be run before deployment is allowed to
# continue, see lib/capistrano/tasks/run_tests.cap
set :tests, []
# which config files should be copied by deploy:setup_config
# see documentation in lib/capistrano/tasks/setup_config.cap
# for details of operations
set(:config_files, %w(
nginx.conf
database.example.yml
aws.example.yml
cable.example.yml
email.example.yml
secrets.example.yml
server.example.yml
application.example.yml
log_rotation
unicorn.rb
unicorn_init.sh
))
# which config files should be made executable after copying
# by deploy:setup_config
set(:executable_config_files, %w(
unicorn_init.sh
))
# files which need to be symlinked to other parts of the
# filesystem. For example nginx virtualhosts, log rotation
# init scripts etc.
set(:symlinks, [
{
source: "nginx.conf",
link: "/etc/nginx/sites-enabled/{{full_app_name}}"
},
{
source: "unicorn_init.sh",
link: "/etc/init.d/unicorn_{{full_app_name}}"
},
{
source: "log_rotation",
link: "/etc/logrotate.d/{{full_app_name}}"
}
])
Now upon deploying cap staging deploy
Full trace by cap staging deploy --trace
deploy:assets:precompile
01 RBENV_ROOT=/home/centos/.rbenv RBENV_VERSION=2.4.0 /home/centos/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
01 rake aborted!
01 NoMethodError: undefined method `symbolize_keys' for nil:NilClass
01 /home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:88:in `block in <top (r…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `insta…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `confi…
01 /home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:1:in `<top (required)>'
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependenci…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependenci…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependenci…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependenci…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:600:in `block …
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `each'
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `block …
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:352:in `i…
01 /home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environment.rb:5:in `<top (required)>'
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `r…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `r…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:448:in `b…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:6…
01 /home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
01 /home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
01 /home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
01 Tasks: TOP => environment
01 (See full trace by running task with --trace)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as centos#54.84.214.65: rake exit status: 1
rake stdout: rake aborted!
NoMethodError: undefined method `symbolize_keys' for nil:NilClass
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:88:in `block in <top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `instance_eval'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `configure'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:1:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `block in require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `block in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `run'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:352:in `initialize!'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environment.rb:5:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require_environment!'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)
rake stderr: Nothing written
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
Caused by:
SSHKit::Command::Failed: rake exit status: 1
rake stdout: rake aborted!
NoMethodError: undefined method `symbolize_keys' for nil:NilClass
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:88:in `block in <top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `instance_eval'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `configure'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:1:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `block in require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `block in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `run'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:352:in `initialize!'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environment.rb:5:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require_environment!'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)
rake stderr: Nothing written
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/command.rb:99:in `exit_status='
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/netssh.rb:169:in `execute_command'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:145:in `block in create_command_and_execute'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:145:in `tap'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:145:in `create_command_and_execute'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:78:in `execute'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/capistrano-rails-1.1.8/lib/capistrano/tasks/assets.rake:69:in `block (6 levels) in <top (required)>'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:97:in `with'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/capistrano-rails-1.1.8/lib/capistrano/tasks/assets.rake:68:in `block (5 levels) in <top (required)>'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:89:in `within'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/capistrano-rails-1.1.8/lib/capistrano/tasks/assets.rake:67:in `block (4 levels) in <top (required)>'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/lib/sshkit/backends/abstract.rb:29:in `run'
/home/developer/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sshkit-1.18.0/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 centos#54.84.214.65: rake exit status: 1
rake stdout: rake aborted!
NoMethodError: undefined method `symbolize_keys' for nil:NilClass
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:88:in `block in <top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `instance_eval'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/railtie.rb:209:in `configure'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environments/production.rb:1:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `block in require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:259:in `load_dependency'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/activesupport-5.0.7.1/lib/active_support/dependencies.rb:293:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `block in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `run'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:352:in `initialize!'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environment.rb:5:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require_environment!'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'
Tasks: TOP => environment
(See full trace by running task with --trace)
rake stderr: Nothing written
** Invoke deploy:failed (first_time)
** Execute deploy:failed
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/engine.rb:599:in `block in <class:Engine>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:30:in `run'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `each'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:352:in `initialize!'
/home/centos/apps/expedite_pm_staging/releases/20190125070939/config/environment.rb:5:in `<top (required)>'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:328:in `require_environment!'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/railties-5.0.7.1/lib/rails/application.rb:448:in `block in run_tasks_blocks'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/home/centos/apps/expedite_pm_staging/shared/bundle/ruby/2.4.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `load'
/home/centos/.rbenv/versions/2.4.0/bin/bundle:22:in `<main>'

I'm trying to deploy in the digital ocean, when the final part arrives ActiveSupport::MessageEncryptor::InvalidMessage

I'm trying to deploy in the digital ocean, when the final part arrives ~ / .rvm / bin / rvm 2.4.4 from the bundle exec rake assets: precompile
it returns this error ActiveSupport :: MessageEncryptor :: InvalidMessage: ActiveSupport :: MessageEncryptor :: InvalidMessage Who can give me a power already thank you!
00:06 deploy:assets:precompile
01 ~/.rvm/bin/rvm 2.4.4 do bundle exec rake assets:precompile
01 rake aborted!
01 ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:206:in `rescue in _decrypt'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:183:in `_decrypt'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:157:in `decrypt_and_verify'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/messages/rotator.rb:21:in `decrypt_and_verify'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_file.rb:79:in `decrypt'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_file.rb:42:in `read'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_configuration.rb:21:in `read'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_configuration.rb:33:in `config'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/encrypted_configuration.rb:38:in `options'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/core_ext/module/delegation.rb:271:in `method_missin…
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/application.rb:433:in `secret_key_base'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/application.rb:176:in `key_generator'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/globalid-0.4.1/lib/global_id/railtie.rb:26:in `block (2 levels) in <class:Railtie>'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:51:in `each'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/application/finisher.rb:75:in `block in <module:Finisher>'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/initializable.rb:32:in `instance_exec'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/initializable.rb:32:in `run'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/initializable.rb:61:in `block in run_initializers'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/initializable.rb:60:in `run_initializers'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/application.rb:361:in `initialize!'
01 /var/www/jrpescados/releases/20180606215329/config/environment.rb:5:in `<main>'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in req…
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with…
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `block in require'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:249:in `load_dependency'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/activesupport-5.2.0/lib/active_support/dependencies.rb:283:in `require'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/application.rb:337:in `require_environment!'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/railties-5.2.0/lib/rails/application.rb:520:in `block in run_tasks_blocks'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
01 /var/www/jrpescados/shared/bundle/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
01 /home/deploy/.rvm/rubies/ruby-2.4.4/bin/bundle:30:in `block in <main>'
01 /home/deploy/.rvm/rubies/ruby-2.4.4/bin/bundle:22:in `<main>'
01 /home/deploy/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:15:in `eval'
01 /home/deploy/.rvm/gems/ruby-2.4.4/bin/ruby_executable_hooks:15:in `<main>'
I have encountered your problem and solved it.
The reason of problem is rails 5.2.0 couldn't get your secret_key_base. You can use gem dotrails in Gemfile and then type command in terminal at local machine: bundle install.
Then add .env to shared/ directory at rails app of remote machine and its content is SECRET_KEY_BASE = 'YOURSECRETKEY'. Also add .env to config/deploy.rb file such as
append :linked_files, ".env"
Kindly reminder: add .env to your .gitignore file.
Last, deploy your app again by capistrano.
Cheers,
Try adding this to your deploy.rb file
before "deploy:assets:precompile", "bundle:install"

Capistrano deploy rails fails on nokogiri

I get the following error when deploying to Ubuntu using:
ruby '2.3.0'
gem 'rails', '~> 4.2', '>= 4.2.5.1'
gem 'rake', '~> 11.3'
gem 'capistrano', '~> 3.9'
This is my server log:
00:29 deploy:assets:precompile
01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile
01 rake aborted!
01 LoadError: libruby.so.2.3: cannot open shared object file: No such file or directory - /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:32:in `require'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:32:in `rescue in <top (required)>'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:28:in `<top (required)>'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/fog-xml-0.1.3/lib/fog/xml.rb:2:in `require'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/fog-xml-0.1.3/lib/fog/xml.rb:2:in `<top (required)>'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/fog-aws-1.4.1/lib/fog/aws.rb:2:in `require'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/fog-aws-1.4.1/lib/fog/aws.rb:2:in `<top (required)>'
01 /home/myapp/myappWeb/releases/20171121132549/config/application.rb:3:in `require'
01 /home/myapp/myappWeb/releases/20171121132549/config/application.rb:3:in `<top (required)>'
01 /home/myapp/myappWeb/releases/20171121132549/Rakefile:4:in `require'
01 /home/myapp/myappWeb/releases/20171121132549/Rakefile:4:in `<top (required)>'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
01 /home/myapp/.rbenv/versions/2.3.0/bin/bundle:23:in `load'
01 /home/myapp/.rbenv/versions/2.3.0/bin/bundle:23:in `<main>'
01 LoadError: cannot load such file -- nokogiri/2.3/nokogiri
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:30:in `require'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:30:in `<top (required)>'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/fog-xml-0.1.3/lib/fog/xml.rb:2:in `require'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/fog-xml-0.1.3/lib/fog/xml.rb:2:in `<top (required)>'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/fog-aws-1.4.1/lib/fog/aws.rb:2:in `require'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/fog-aws-1.4.1/lib/fog/aws.rb:2:in `<top (required)>'
01 /home/myapp/myappWeb/releases/20171121132549/config/application.rb:3:in `require'
01 /home/myapp/myappWeb/releases/20171121132549/config/application.rb:3:in `<top (required)>'
01 /home/myapp/myappWeb/releases/20171121132549/Rakefile:4:in `require'
01 /home/myapp/myappWeb/releases/20171121132549/Rakefile:4:in `<top (required)>'
01 /home/myapp/myappWeb/shared/bundle/ruby/2.3.0/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
01 /home/myapp/.rbenv/versions/2.3.0/bin/bundle:23:in `load'
01 /home/myapp/.rbenv/versions/2.3.0/bin/bundle:23:in `<main>'
01 (See full trace by running task with --trace)
What do you get if you try to run gem install nokogiri from your app directory on your server?
You might be missing some librairies on your server. See http://www.nokogiri.org/tutorials/installing_nokogiri.html
I reinstalled the entire ubuntu system on the server. Then reinstalled ruby and bundler. Everything worked after this.

Cannot generate rails_admin:install

bundle exec rails generate rails_admin:install
/home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/lib/nokogiri.rb:28:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/nokogiri-1.6.0/lib/nokogiri.rb:28:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack/pjax.rb:1:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack/pjax.rb:1:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack-pjax.rb:2:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rack-pjax-0.7.0/lib/rack-pjax.rb:2:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin/engine.rb:7:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin/engine.rb:7:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin.rb:1:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/rails_admin-0.5.0/lib/rails_admin.rb:1:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247#global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /home/vieirater/University/config/application.rb:7:in `<top (required)>'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:44:in `require'
from /home/vieirater/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

Resources