Skip to content

include gem uglifier for production#2741

Merged
xsrust merged 7 commits intoDMPRoadmap:developmentfrom
nicolasfranck:fix_issue_uglifier
Dec 9, 2020
Merged

include gem uglifier for production#2741
xsrust merged 7 commits intoDMPRoadmap:developmentfrom
nicolasfranck:fix_issue_uglifier

Conversation

@nicolasfranck
Copy link
Contributor

If you run

bin/rails assets:precompile

in production mode, you'll get a stack trace

yarn install v1.22.5
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.64s.
rails aborted!
LoadError: cannot load such file -- uglifier
/home/install/roadmap-ugent/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:34:in `require'
/home/install/roadmap-ugent/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `block in require'
/home/install/roadmap-ugent/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/install/roadmap-ugent/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.4.3/lib/active_support/dependencies.rb:291:in `require'
/home/install/roadmap-ugent/vendor/bundle/ruby/2.6.0/gems/sprockets-4.0.2/lib/sprockets/autoload/uglifier.rb:2:in `<main>'
[..]

I'm not sure if this gem is actually needed (we have webpack now, not?),
but in case we do, I added it to the Gemfile, and now it stops complaining.

@xsrust
Copy link
Contributor

xsrust commented Nov 24, 2020

@nicolasfranck I've made some changes to the github-actions definitions in the development branch so I'm going to update your PRs (I believe it will make changes to the branch on your fork).

Looks like the failures on MySQL and PostgreSQL are due to PRs from forks being unable to use github-secrets as part of the actions workflow. I've updated this workflow so instead of storing the master.key in github-secrets, the credentials will just get re-generated each run.

@briri
Copy link
Contributor

briri commented Nov 25, 2020

thanks. yes, webpacker should be doing all of the minification. We will look into the bootsnap connection and see if we can update it to prevent the error/warning

@nicolasfranck
Copy link
Contributor Author

strange, the mysql tests fail here too with unrelated errors. Seems like some things were added before without running those tests?

Copy link
Contributor

@xsrust xsrust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this @nicolasfranck

Rebased this off development but tests were passing before so should continue to pass.
The MySQL failure before seems to have been a one-off, as re-running resolved the issue.

@xsrust
Copy link
Contributor

xsrust commented Dec 9, 2020

Merging as all passing

@xsrust xsrust merged commit b2faeaf into DMPRoadmap:development Dec 9, 2020
portagenetwork pushed a commit to portagenetwork/roadmap that referenced this pull request Feb 24, 2022
* include uglifier for production

* Revert "include uglifier for production"

This reverts commit a9c7ec4.

* webpacker should do all of the minification

Co-authored-by: Sam Rust <xsrust@gmail.com>
Co-authored-by: Brian Riley <brian.riley@ucop.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants