New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem migration with not (yet) existing fields: NoMethodError: undefined method `defined' for nil:NilClass unless f.defined #3546
Comments
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.
|
What do you have in |
basically it includes
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: rails/webpacker#3188 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:
rails_admin/lib/rails_admin/config/has_fields.rb
Line 90 in ce1bb5a
that causes the follwing block to fail:
rails_admin/lib/rails_admin/config/has_fields.rb
Line 92 in ce1bb5a
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 ?
The text was updated successfully, but these errors were encountered: