You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #782, there was an update to read values from Rails credentials. Credentials were added in Rails 5.2, which means this throws an error when using Flipper 1.1.0+ and Rails < 5.2:
2.544 NoMethodError: undefined method `credentials' for #<Website::Application:0x0000ffff8676ff30>2.544 /website/config/environment.rb:5:in `<top (required)>'2.544 /usr/local/ruby-2.7.8/bin/bundle:23:in `load'2.544 /usr/local/ruby-2.7.8/bin/bundle:23:in `<main>'
2.544 Tasks: TOP => environment
2.544 (See full trace by running task with --trace)
There isn't an explicit dependency on particular Rails versions in the gemspec, however flipper-active_record does have a requirement for Rails >= 4.2. Without getting too nitpicky on the solutions here, some possible options:
Set a minimum Rails version in order to use Flipper
to check if the credentials method exists, and if not rely on the env vars
There's also a question of whether those env var checks need to happen there, rather than inside the cloud? block since they seem to only apply to cloud users (this is not used in a cloud application FWIW).
The text was updated successfully, but these errors were encountered:
In #782, there was an update to read values from Rails credentials. Credentials were added in Rails 5.2, which means this throws an error when using Flipper 1.1.0+ and Rails < 5.2:
There isn't an explicit dependency on particular Rails versions in the gemspec, however
flipper-active_record
does have a requirement for Rails >= 4.2. Without getting too nitpicky on the solutions here, some possible options:flipper/lib/flipper/engine.rb
Lines 41 to 42 in 0e99629
There's also a question of whether those env var checks need to happen there, rather than inside the
cloud?
block since they seem to only apply to cloud users (this is not used in a cloud application FWIW).The text was updated successfully, but these errors were encountered: