-
Notifications
You must be signed in to change notification settings - Fork 422
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
TypeError: no implicit conversion of nil into String #1738
Conversation
`ViewComponent::Base.config.view_component_path` is null and `Regexp.quote(ViewComponent::Base.config.view_component_path)` raises `TypeError: no implicit conversion of nil into String`. Checking `defined?(Rails) && Rails.application` seems to solve the problem.
|
@joelhawksley I can try but I have no experience on how to test a gem against another gem :-). Does it make sense? |
@donapieppo sounds like it might not be worth the trouble. I'll merge as-is! |
Thanx! Create the standard example blorgh engine as in rails documentation: rails plugin new blorgh --mountable and add Than create a first component (for example If in With this pull request it works also with the require of the component in |
) * When view-component is required in a Rails::Engine the variable `ViewComponent::Base.config.view_component_path` is null and `Regexp.quote(ViewComponent::Base.config.view_component_path)` raises `TypeError: no implicit conversion of nil into String`. Checking `defined?(Rails) && Rails.application` seems to solve the problem. * changelog --------- Co-authored-by: Joel Hawksley <joel@hawksley.org>
) * When view-component is required in a Rails::Engine the variable `ViewComponent::Base.config.view_component_path` is null and `Regexp.quote(ViewComponent::Base.config.view_component_path)` raises `TypeError: no implicit conversion of nil into String`. Checking `defined?(Rails) && Rails.application` seems to solve the problem. * changelog --------- Co-authored-by: Joel Hawksley <joel@hawksley.org>
When view-component is required in a Rails::Engine the variable
ViewComponent::Base.config.view_component_path
is null andRegexp.quote(ViewComponent::Base.config.view_component_path)
raises
TypeError: no implicit conversion of nil into String
.Checking
defined?(Rails) && Rails.application
seems to solve the problem.May be related to #1565
but in 3.0.0 version.