Skip to content

Commit 282e0a5

Browse files
committed
Fix ReactOnRailsPro::Utils uninitialized constant error
After Phase 6 restructure, the Pro gem needs to be explicitly required before checking if its constants are defined. Just checking if the gem is available in Gem.loaded_specs doesn't actually load the gem's code. Fixes rspec-package-tests failures.
1 parent 555a1b6 commit 282e0a5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/react_on_rails/utils.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ def self.react_on_rails_pro?
259259
@react_on_rails_pro = begin
260260
return false unless gem_available?("react_on_rails_pro")
261261

262+
require "react_on_rails_pro" unless defined?(ReactOnRailsPro)
262263
ReactOnRailsPro::Utils.validated_license_data!.present?
263264
end
264265
end

0 commit comments

Comments
 (0)