while deploying via capistrano Uglifier::Error - ruby-on-rails

I am deploying my rails app with capistrano, but step with deploy:assets:precompile failed, there is an error with uglifier
00:11 deploy:assets:precompile
01 ~/.rvm/bin/rvm default do bundle exec rake assets:precompile
01 yarn install v1.22.19
01 [1/4] Resolving packages...
01 [2/4] Fetching packages...
01 [3/4] Linking dependencies...
01 [4/4] Building fresh packages...
01 Done in 0.11s.
01 rake aborted!
01 Uglifier::Error:
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/uglifier-4.2.0/lib/uglifier.rb:291:in `parse_result'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/uglifier-4.2.0/lib/uglifier.rb:221:in `run_uglifyjs'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/uglifier-4.2.0/lib/uglifier.rb:166:in `compile'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/compressing.rb:65:in `block in js_compressor='
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/legacy_proc_processor.rb:31:in `call'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:75:in `call_processor'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `reverse_each'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/processor_utils.rb:56:in `call_processors'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:134:in `load_from_unloaded'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:60:in `block in load'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:44:in `load'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:20:in `block in initialize'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/cached_environment.rb:47:in `load'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:66:in `find_asset'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:73:in `find_all_linked_assets'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:142:in `block in find'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `each'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:209:in `stat_directory'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/path_utils.rb:227:in `stat_tree'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `each'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `each'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/legacy.rb:104:in `logical_paths'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:140:in `find'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/sprockets/manifest.rb:186:in `compile'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:67:in `block (3 levels) in define'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-3.7.2/lib/rake/sprocketstask.rb:147:in `with_logger'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/sprockets-rails-3.4.2/lib/sprockets/rails/task.rb:66:in `block (2 levels) in define'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/bin/ruby_executable_hooks:22:in `eval'
01 /home/deployer/qna/shared/bundle/ruby/2.7.0/bin/ruby_executable_hooks:22:in `<main>'
01 Tasks: TOP => assets:precompile
01 (See full trace by running task with --trace)
what are possible solutions?
in config/environments/production.rb I have config.assets.js_compressor = Uglifier.new(harmony: true)

Related

LoadError: incompatible library version, when deploying with capistrano to Digital Ocean

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!

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>'

Rake assets in Rails app Heroku

I am trying rake assets:precompile with command "heroku run rake assets:precompile" but I have this error:
Running rake assets:precompile on ⬢ infinite-meadow-50968... up, run.9141 (Free)
yarn install v1.8.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 1.70s.
rake aborted!
Uglifier::Error: Unexpected character '#'
/app/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.10/lib/uglifier.rb:234:in `parse_result'
/app/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.10/lib/uglifier.rb:216:in `run_uglifyjs'
/app/vendor/bundle/ruby/2.5.0/gems/uglifier-4.1.10/lib/uglifier.rb:168:in `compile'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/compressing.rb:65:in `block in js_compressor='
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy_proc_processor.rb:31:in `call'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:142:in `block in find'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `logical_paths'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:140:in `find'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
/app/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
Github
Styling on subpages does not work https://infinite-meadow-50968.herokuapp.com/meetups/ See the menu and the section with meetups (in the main page its working)
Can you try to precompile in local? After push it into Heroku. It may be working.
All your js files have wrong syntax for comments. You use # instead of //.
E.g. #= require froala_editor.min.js should be //= require froala_editor.min.js.
You use # for comments in coffee files, and // for js files. Please replace it in all your js files.

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.

Resources