运行 rails 秒后 gem 更新 returns 警告列表 - 警告:常量已初始化 Etc::SC_AIO_LISTIO_MAX
Running rails s after gem update returns list of warnings - warning: already initialized constant Etc::SC_AIO_LISTIO_MAX
我刚刚尝试使用命令 gem update
更新我的 gem 库并且更新顺利完成。
之后,我将 Gemfile 中的 rails 项目的版本从 6.0.1
更新为 6.0.3
,在 运行 rails s
之后,我收到了警告列表:
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/fileutils/version.rb:4: warning: already initialized constant FileUtils::VERSION
/home/zire/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/fileutils-1.4.1/lib/fileutils.rb:105: warning: previous definition of VERSION was here
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_AIO_LISTIO_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_AIO_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_AIO_PRIO_DELTA_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_ARG_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_ATEXIT_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_BC_BASE_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_BC_DIM_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_BC_SCALE_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_BC_STRING_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_CHILD_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_CLK_TCK
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_COLL_WEIGHTS_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_DELAYTIMER_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_EXPR_NEST_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_HOST_NAME_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_IOV_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_LINE_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_LOGIN_NAME_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_NGROUPS_MAX
我通过 gem uninstall fileutils
和 运行 gem update --default
卸载 fileutilis 修复了第一行问题
现在我对其余的警告行有疑问。有什么解决办法吗?
我在 运行ning bundle update
命令之后找到了解决方案我也 运行 bundle clean --force
和 rails s
命令的下一个 运行 全部警告消失。
我刚刚尝试使用命令 gem update
更新我的 gem 库并且更新顺利完成。
之后,我将 Gemfile 中的 rails 项目的版本从 6.0.1
更新为 6.0.3
,在 运行 rails s
之后,我收到了警告列表:
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/fileutils/version.rb:4: warning: already initialized constant FileUtils::VERSION
/home/zire/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/fileutils-1.4.1/lib/fileutils.rb:105: warning: previous definition of VERSION was here
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_AIO_LISTIO_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_AIO_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_AIO_PRIO_DELTA_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_ARG_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_ATEXIT_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_BC_BASE_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_BC_DIM_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_BC_SCALE_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_BC_STRING_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_CHILD_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_CLK_TCK
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_COLL_WEIGHTS_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_DELAYTIMER_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_EXPR_NEST_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_HOST_NAME_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_IOV_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_LINE_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_LOGIN_NAME_MAX
/home/zire/.rbenv/versions/2.6.4/lib/ruby/2.6.0/x86_64-linux/etc.so: warning: already initialized constant Etc::SC_NGROUPS_MAX
我通过 gem uninstall fileutils
和 运行 gem update --default
现在我对其余的警告行有疑问。有什么解决办法吗?
我在 运行ning bundle update
命令之后找到了解决方案我也 运行 bundle clean --force
和 rails s
命令的下一个 运行 全部警告消失。