Closed MaximilianMeister closed 6 years ago
View changes Do we require uglifier in production? I thought this was needed when compiling the assets.
It's only used to compile/compress the assets. but nevertheless this file is parsed, and (at least) the constant Uglifier
needs to be loaded
uglifier is in the assets group. IIRC this group won't be installed on a production environment, thus requiring uglifier will break the RPM. Am I missing something?
uglifier is in the assets group. IIRC this group won't be installed on a production environment, thus requiring uglifier will break the RPM. Am I missing something?
@jordimassaguerpla that makes total sense, maybe it's a devsetup issue. when i run docker exec -it $(docker ps | grep "velum-dashboard" | awk '{print $1}') entrypoint.sh bash -c "export RAILS_ENV=production; bundle exec rails c"
I get this error. and look at the RAILS_ENV here ... :thinking:
the constant
Uglifier
is not accessible when opening a rails console or running a rake commandfix#uglifier
Signed-off-by: Maximilian Meister mmeister@suse.de
Follow up of
https://github.com/kubic-project/velum/pull/630
@jordimassaguerpla a more elegant nitpicky solution would probably be to only configure
Uglifier
when we precompile the assets, as during runtime we don't really need it. But since we dont have thePACKAGING
env anymore, we don't have an easy way to determine if we're about to precompile or not. it would look like this:On the other hand it might not be an issue to load
Uglifier
during the rails console session, as during runtime it seems to be loaded and accessible already