Closed rcugut closed 6 years ago
I think it's better to use ENV['RAILS_ENV']
here instead of Rails.env
as gon doesn't require all rails parts and specs are failing because of that. But I totally agree with this fix, thank you very much for finding it!
Good suggestion. I did another commit with it.
However IMO this should be better addressed in the Rails codebase itself. It's an undesired side-effect that nobody really expects to come into, when they just "require" (or autoload) a module.
Fixed with https://github.com/gazay/gon/pull/252
This fixes the (unintentional?) loading of
ActionController::TestCase::Behavior
in non-test environment, which breaks the methodActionController::Live#new_controller_thread
and makes the server to hang.basic demo project to show the issue: https://github.com/rcugut/xlsxtream_playground