Skip to content

Register dev tools assets whenever debug mode is enabled - #62

Merged
marcoroth merged 3 commits into
marcoroth:mainfrom
tk0miya:61/install_assets_if_debug_mode_enabled
Aug 8, 2026
Merged

Register dev tools assets whenever debug mode is enabled#62
marcoroth merged 3 commits into
marcoroth:mainfrom
tk0miya:61/install_assets_if_debug_mode_enabled

Conversation

@tk0miya

@tk0miya tk0miya commented Nov 16, 2025

Copy link
Copy Markdown
Contributor

Now asset files are installed only in development environment. Therefore, the debug mode cannot be used in production environment.

This change makes it possible to install asset files when the debug mode is enabled, regardless of the environment.

ref: #61

Now asset files are installed only in development environment. Therefore,
the debug mode cannot be used in production environment.

This change makes it possible to install asset files when the debug mode
is enabled, regardless of the environment.

ref: marcoroth#61
@marcoroth

marcoroth commented Nov 16, 2025

Copy link
Copy Markdown
Owner

Thanks for the pull request @tk0miya!

I'm really wondering if we should allow to ship the ReActionView assets in production by default.

In the future, it will make sense to run ReActionView in production. But for the time being where it's only the Dev Tools I'm not sure it makes sense to allow it. Also, because all the paths etc. are not going to work, since it will use the paths on disk from the deployed host.

Maybe we can make it opt-in, so it's more intentional?

@tk0miya

tk0miya commented Nov 17, 2025

Copy link
Copy Markdown
Contributor Author

In my case, I've used the Rails' production environment not only for production usage.

For example, we have four servers: development, QA, staging, and production. On these servers, our Rails application is running in the production environment. And I tried to enable reactionview only on the development server.

Actually, I enabled debug_mode like such configuration:

# Enable debug_mode via RAILS_ENV or settings.yml (config gem)
config.debug_mode = Rails.env.development? || Settings.reactionview.enabled

I'm really wondering if we should allow to ship the ReActionView assets in production by default.

In the future, it will make sense to run ReActionView in production. But for the time being where it's only the Dev Tools I'm not sure it makes sense to allow it. Also, because all the paths etc. are not going to work, since it will use the paths on disk from the deployed host.

The current implementation of reactionview installs ERB handler if intercept_erb is enabled regardless to the RAILS_ENV. Is this intended? I feel this is intended and designed for future work.

@marcoroth marcoroth changed the title Install assets if debug mode is enabled Register dev tools assets whenever debug mode is enabled Aug 8, 2026

@marcoroth marcoroth left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @tk0miya, and apologies it sat for so long.

@marcoroth
marcoroth merged commit f9eeefd into marcoroth:main Aug 8, 2026
24 checks passed
@tk0miya
tk0miya deleted the 61/install_assets_if_debug_mode_enabled branch August 8, 2026 03:36
@tk0miya

tk0miya commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Thanks!

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.

2 participants