It was one day
$ bundle install
When you enter
Traceback (most recent call last):
~/.rbenv/versions/2.5.0/bin/ruby: invalid option -: (-h will show valid options) (RuntimeError)
Yeah yeah what is this! It doesn't accept other commands, what did you do ...
I must have done something deadly ...
(My environment)/vendor/bundle/ruby/2.7.0/gems/active_hash-3.1.0/lib/associations/associations.rb:22: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
(My environment)/vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.3.1/lib/active_record/associations.rb:1657: warning: The called method `belongs_to' is defined here
I get a lot of warnings when I enter Rails commands and it's annoying The gem warning is important, but ok
export RUBYOPT='-W:no-deprecated -W:no-experimental'
The warning disappeared when I added the above to .zshrc
It's stress-free
Since development with another version became indispensable, I lowered the version (Ruby: 2.5)
Traceback (most recent call last):
~/.rbenv/versions/2.5.0/bin/ruby: invalid option -: (-h will show valid options) (RuntimeError)
Until now, this didn't happen with another version ...
export RUBYOPT='-W:no-deprecated -W:no-experimental'
I solved it by removing this from the environment variables. Don't forget to remove it when the gem version goes up and you don't get any warnings.
https://qiita.com/mojihige/items/ce3282bec0c58f8ba637 https://qiita.com/hirocueki2/items/010c777d2125ee120a8e
Recommended Posts