Closed le0pard closed 3 weeks ago
How do you load the gem? You must load it via the require "anyway_config"
to setup the load path properly (so the Ruby 3.4+ files are not loaded in Ruby 3.3).
Does the following command work for you as below?
$ ruby -v
ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [arm64-darwin23]
$ TEST_FOO__BAR=1 ruby -ranyway_config -e "puts Anyway::Config.for(:test)"
{"foo"=>{"bar"=>1}}
It is not after load, it is output in docker environment after bundle install
command
Hm, do you run something like bootsnap precompile
then? (Or whatever else trying to read Ruby files)
yes, this is command in docker:
RUN bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile
so yes, it can be warning from bootsnap
command. But generated by this gem
Well, bootsnap precompile
is a static tool, so there is hardly anything we can do here. Since the compiled file is not used in production, it's safe to disable warnings (to reduce the noise). Try something like `RUBYOPT=-W0".
What did you do?
Install gem with ruby 3.3.5
What did you expect to happen?
No warnings.
What actually happened?
Have warnings about
it
usage:Additional context
Environment
Ruby Version: 3.3.5
Framework Version (Rails, whatever): 7.1
Anyway Config Version: 2.6.4