warning: already initialized constant FileUtils::VERSION

c3tc3tc3t發表於2018-11-26

Ran into this, and the solution here works: https://stackoverflow.com/questions/51334732/rails-5-2-0-with-ruby-2-5-1-console-warning-already-initialized-constant

I understand 1.0.2 stays installed as the default, 1.1.0 being installed too. Hence the issue.

When installed automatically, I get the warnings. Following command shows (new rails app, 2.5.1) :

gem list | grep fileutils
fileutils (1.1.0, default: 1.0.2)

Then doing:

gem uninstall fileutils
gem update fileutils --default

makes the warnings disappear. And btw, it shows:

gem list | grep fileutils
fileutils (default: 1.1.0, default: 1.0.2)

Hope it will help fixing this annoyance. Sorry I cannot be of more help, not really a wizard with those versioning topics!

相關文章