-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
When adding an environment variable config file with figaro, placing MAGIC_TEST=1 in the file and running rails test test/system/basics_test.rb doesn't work for me.
Error Log
> rails test test/system/basics_test.rb
/Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/figaro-1.2.0/lib/figaro/application.rb:64:in `global_configuration': undefined method `reject' for "MAGIC_TEST=1":String (NoMethodError)
raw_configuration.reject { |_, value| value.is_a?(Hash) }
^^^^^^^
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/figaro-1.2.0/lib/figaro/application.rb:32:in `configuration'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/figaro-1.2.0/lib/figaro/application.rb:42:in `each'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/figaro-1.2.0/lib/figaro/application.rb:36:in `load'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/figaro-1.2.0/lib/figaro.rb:23:in `load'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/figaro-1.2.0/lib/figaro/rails/railtie.rb:5:in `block in <class:Railtie>'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/activesupport-7.0.5/lib/active_support/lazy_load_hooks.rb:92:in `block in execute_hook'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/activesupport-7.0.5/lib/active_support/lazy_load_hooks.rb:85:in `with_execution_control'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/activesupport-7.0.5/lib/active_support/lazy_load_hooks.rb:90:in `execute_hook'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/activesupport-7.0.5/lib/active_support/lazy_load_hooks.rb:76:in `block in run_load_hooks'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/activesupport-7.0.5/lib/active_support/lazy_load_hooks.rb:75:in `each'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/activesupport-7.0.5/lib/active_support/lazy_load_hooks.rb:75:in `run_load_hooks'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.5/lib/rails/application.rb:74:in `inherited'
from /Users/gabriel_zayas/ror/magic2/config/application.rb:10:in `<module:Magic2>'
from /Users/gabriel_zayas/ror/magic2/config/application.rb:9:in `<main>'
from /Users/gabriel_zayas/ror/magic2/config/environment.rb:2:in `require_relative'
from /Users/gabriel_zayas/ror/magic2/config/environment.rb:2:in `<main>'
from /Users/gabriel_zayas/ror/magic2/test/test_helper.rb:2:in `require_relative'
from /Users/gabriel_zayas/ror/magic2/test/test_helper.rb:2:in `<main>'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/gabriel_zayas/ror/magic2/test/application_system_test_case.rb:1:in `<main>'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/gabriel_zayas/ror/magic2/test/system/basics_test.rb:1:in `<main>'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.5/lib/rails/test_unit/runner.rb:47:in `block in load_tests'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.5/lib/rails/test_unit/runner.rb:47:in `each'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.5/lib/rails/test_unit/runner.rb:47:in `load_tests'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.5/lib/rails/test_unit/runner.rb:40:in `run'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.5/lib/rails/commands/test/test_command.rb:33:in `perform'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.5/lib/rails/command/base.rb:87:in `perform'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.5/lib/rails/command.rb:48:in `invoke'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/railties-7.0.5/lib/rails/commands.rb:18:in `<main>'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/gabriel_zayas/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from bin/rails:4:in `<main>'
It seems like it's related to this issue
Metadata
Metadata
Assignees
Labels
No labels