Skip to content
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

[BUG] Support non-webpacker environments #582

Merged
merged 1 commit into from Dec 6, 2023

Conversation

kbrock
Copy link
Contributor

@kbrock kbrock commented Jun 8, 2023

Hi all,

I finally updating my local copy of rack-mini-profiler. (it has been since 2018 - sorry)

Ran into this problem running rails 6.1.

It may be because our rails ui is running as an engine, or because I load rack-mini-profiler in an initializer instead of the standard gem 'rack-mini-profiler' syntax. (hoping this new code base will mean I can drop that too)

If you want me to code this up differently, let me know.


Webpacker can be defined, but not configured.

Problem

lib/mini_profiler_rails/railtie_methods.rb:55:in `get_webpacker_assets_path': undefined method `config' for Webpacker:Module (NoMethodError)
Did you mean?  concerning
	from lib/mini_profiler_rails/railtie.rb:33:in `initialize!'

Solution

Treating it like webpacker is not present.

  • Ensure the full chain is available

Webpacker can be defined, but not configured.

In this case, treating it like webpacker is not present

```
lib/mini_profiler_rails/railtie_methods.rb:55:in `get_webpacker_assets_path': undefined method `config' for Webpacker:Module (NoMethodError)
Did you mean?  concerning
	from lib/mini_profiler_rails/railtie.rb:33:in `initialize!'
```

solution:

ensure the full chain is available
@kbrock kbrock changed the title Support non-webpacker environments [BUG] Support non-webpacker environments Jun 15, 2023
@nateberkopec nateberkopec merged commit a072362 into MiniProfiler:master Dec 6, 2023
5 checks passed
@kbrock kbrock deleted the webpack_config branch December 6, 2023 16:01
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.

None yet

2 participants