Closed jklimke closed 1 year ago
Could you try with the master branch? I guess #3541 will solve this.
gem 'rails_admin', github: 'railsadminteam/rails_admin'
Could you try with the master branch? I guess #3541 will solve this.
gem 'rails_admin', github: 'railsadminteam/rails_admin'
This seems to solve the issue as the models are loaded deferred again. Nevertheless i did not manage to build a docker deployment with the current master as the webpacker build fails in my CI and on docker hub. Is it possible that there wer issues introduced that cause these processes to fail or to consume a lot more resources.
The error produced does not make any sense to me. The scss files are the ones generate by rails admin.
ERROR in ./app/javascript/stylesheets/rails_admin.scss (./node_modules/css-loader/dist/cjs.js??ref--8-1!./node_modules/postcss-loader/src??ref--8-2!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js??ref--8-4!./app/javascript/stylesheets/rails_admin.scss)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
ParserError: Syntax Error at line: 1, column 30
at /builds/tasa_hpi/tasa_web/app/javascript/stylesheets/rails_admin.scss:9:1165
at Parser.error (/builds/tasa_hpi/tasa_web/node_modules/postcss-values-parser/lib/parser.js:127:11)
at Parser.operator (/builds/tasa_hpi/tasa_web/node_modules/postcss-values-parser/lib/parser.js:162:20)
at Parser.parseTokens (/builds/tasa_hpi/tasa_web/node_modules/postcss-values-parser/lib/parser.js:245:14)
at Parser.loop (/builds/tasa_hpi/tasa_web/node_modules/postcss-values-parser/lib/parser.js:132:12)
at Parser.parse (/builds/tasa_hpi/tasa_web/node_modules/postcss-values-parser/lib/parser.js:51:17)
at parse (/builds/tasa_hpi/tasa_web/node_modules/postcss-custom-properties/index.cjs.js:47:30)
at /builds/tasa_hpi/tasa_web/node_modules/postcss-custom-properties/index.cjs.js:333:24
at /builds/tasa_hpi/tasa_web/node_modules/postcss/lib/container.js:194:18
at /builds/tasa_hpi/tasa_web/node_modules/postcss/lib/container.js:139:18
at Rule.each (/builds/tasa_hpi/tasa_web/node_modules/postcss/lib/container.js:105:16)
at Rule.walk (/builds/tasa_hpi/tasa_web/node_modules/postcss/lib/container.js:135:17)
at /builds/tasa_hpi/tasa_web/node_modules/postcss/lib/container.js:152:24
at Root.each (/builds/tasa_hpi/tasa_web/node_modules/postcss/lib/container.js:105:16)
at Root.walk (/builds/tasa_hpi/tasa_web/node_modules/postcss/lib/container.js:135:17)
at Root.walkDecls (/builds/tasa_hpi/tasa_web/node_modules/postcss/lib/container.js:[192](https://gitlab.hpi3d.de/tasa_hpi/tasa_web/-/jobs/203799#L192):19)
at transformProperties (/builds/tasa_hpi/tasa_web/node_modules/postcss-custom-properties/index.cjs.js:330:8)
at Object.syncTransform [as plugin] (/builds/tasa_hpi/tasa_web/node_modules/postcss-custom-properties/index.cjs.js:522:5)
at /builds/tasa_hpi/tasa_web/node_modules/postcss-preset-env/index.js:459:97
@ ./app/javascript/stylesheets/rails_admin.scss 2:26-278
@ ./app/javascript/packs/rails_admin.js
What do you have in app/javascript/stylesheets/rails_admin.scss
?
basically it includes
@import "rails_admin/src/rails_admin/styles/base.scss";
Meanwhile i was able to hunt it down to a issue in postcss-values-parser and sass packages. It unfortunately took a lot of hours.
It seems related with this webpacker issue in webpacker: https://github.com/rails/webpacker/issues/3188 There seem to be SCSS issues in fontawesome and bootstrap that are causing this: https://github.com/twbs/bootstrap/pull/35033 https://github.com/FortAwesome/Font-Awesome/issues/18899
You should maybe think about upgrading fontawesome to 6.2 when it is available.
I locked my sass implementation to 1.39.0 an it seems to compiles again in docker and asset precompilation.
Anyway, thanks for your support.
Situation:
A developer that has to execute the added migrations to its development database. As there were many fields (e.g., :short_name) added to some models, there are referenced in Rails admin concerns, e.g.,
We are then not able to execute the migrations or start the server as the initialization of rails admin does not proceed.
The following error is thrown
How is it meant to work ?
It seems that this line can in fact return nil members in the array:
https://github.com/railsadminteam/rails_admin/blob/ce1bb5a1c166b62412e4032b2d1f798297a7c289/lib/rails_admin/config/has_fields.rb#L90
that causes the follwing block to fail:
https://github.com/railsadminteam/rails_admin/blob/ce1bb5a1c166b62412e4032b2d1f798297a7c289/lib/rails_admin/config/has_fields.rb#L92
it can be fixed by compacting the defined array.
Any oppinions on that ? Could you either apply the change or provide a hint how could this be avoided that rails admin crashes on not (yet) existing fields ?