Updates failed; 'bundle exec rake assets:precompile' failed

AI-generated summary

The user waffleslop encountered an issue with their Discourse installation, where the command bundle exec rake assets:precompile failed. The error message suggested looking for earlier error messages, but the user was unable to identify the cause.

After attempting to update and rebuild the app, as suggested by codinghorror, the issue persisted. Falco suggested that the user should follow the error message’s advice and look for earlier error messages.

The user eventually discovered that the issue was caused by the Custom Wizard plugin, and was able to resolve the issue by removing it. sam had suggested commenting out custom plugins to isolate the issue.

The user thanked the developers working on the Custom Wizard plugin and also commended pmusaraj for their work on other plugins. Other users, including Scott_M and neounix, commented on the issue and suggested that a feature to disable all plugins with a single switch would be useful for debugging.

166:M 09 Apr 2020 19:22:49.160 * Saving the final RDB snapshot before exiting.
166:M 09 Apr 2020 19:22:49.183 * DB saved on disk
166:M 09 Apr 2020 19:22:49.183 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake asse                  ts:precompile' failed with return #<Process::Status: pid 12966 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>                  ["su discourse -c 'bundle exec rake assets:precompile'"]}
5148cdd01588a9ec15d9a282a502da071bb6863d127112ea0d1526177593c6ae
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages,                   there may be more than one.
./discourse-doctor may help diagnose the problem.
root@lab:/var/discourse# docker update

Screenshot of /admin/upgrade#/: Image 2020-04-09 at 3.58.11 PM

Any advice?

Can you get latest and try building again? There were some recent checkins which might have been a problem.

I just ran:

cd /var/discourse
git pull
./launcher rebuild app

Result:

166:M 09 Apr 2020 21:28:03.463 * Saving the final RDB snapshot before exiting.
166:M 09 Apr 2020 21:28:03.494 * DB saved on disk
166:M 09 Apr 2020 21:28:03.494 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #<Process::Status: pid 12955 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake assets:precompile'"]}
e9cd09967fbf566b05f3ecedf900f2884c879e55e75350475ac8e28599439cfd
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

You need to do what the message says.

I found the following:
1.)

0:  aws-sdk-s3 (1.61.2) from /var/www/discourse/vendor/bundle/ruby/2.6.0/specifications/aws-sdk-s3-1.61.2.gemspec
Bundle complete! 127 Gemfile dependencies, 158 gems now installed.
Gems in the groups test and development were not installed.
Bundled gems are installed into `./vendor/bundle`

2.)

rake aborted!
Sprockets::FileNotFound: couldn't find file 'jquery.putcursoratend.js' with type 'application/javascript'

3.)

167:M 09 Apr 2020 21:43:12.897 # Redis is now ready to exit, bye bye...
2020-04-09 21:43:12.914 UTC [50] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #<Process::Status: pid 12968 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake assets:precompile'"]}
8332d3e8c049ac2f88e9fa9c0cc00acf93450485f515126bef7f87a61bd13d52
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

Do you have any custom plugins that are not official? If so comment them out

I just had:

      - git clone https://github.com/discourse/docker_manager.git
      - git clone https://github.com/angusmcleod/discourse-custom-wizard.git

Isolated incident down to the Custom Wizard creating the error. I was able to pull the latest Discourse once I removed Custom Wizard.

Looks like @angus and @pmusaraj are working on the solution:
Custom Wizard Plugin 🧙 - #459

PS - @pmusaraj I just installed your Zoom plugin and it is something I’ve been wanting for a few months. Thank you for your constant innovation.

And thanks to you for giving me a heads up on which plugin was failing. I was going to have to going through them one by one.

This is one feature which I would like to see, but I don’t think it is doable in these types of frameworks apps:

A single admin switch to disable / enable all plugins…

This would make everyone’s sys admin life easier when things go south. Having the admin ability to turn off all plugins without the need to rebuild, would facility user debugging and they could / would know easily “this is a plugin issue”.