# Newbie question about local gems vs. system installed ruby

**URL:** <https://www.ruby-forum.com/t/newbie-question-about-local-gems-vs-system-installed-ruby/260729>\
**Category:** Uncategorized\
**Created:** [December 31, 2020, 2:06am UTC](https://www.ruby-forum.com/t/newbie-question-about-local-gems-vs-system-installed-ruby/260729 "2020-12-31T02:06:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benibilme](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e5b9ba/32.png) [@benibilme](https://www.ruby-forum.com/u/benibilme)\
**Post date:** [December 31, 2020, 2:06am UTC](https://www.ruby-forum.com/t/newbie-question-about-local-gems-vs-system-installed-ruby/260729/1 "2020-12-31T02:06:28Z")

</div>

Hello,

I receive following annoying warnings in my environment. I am using manjaro  
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86\_64-linux]. I deleted local .gem reporsitory and call gem update and recreate the .gem. The problem continues. I do not understand why I receive these warnings? Because of update? Then how can I prevent it and tell gem to use the updated packages?

Any help much appreciated?

```
/usr/lib/ruby/2.7.0/uri/version.rb:3: warning: already initialized constant URI::VERSION_CODE
/home/toktay/.gem/ruby/2.7.0/gems/uri-0.10.1/lib/uri/version.rb:3: warning: previous definition of VERSION_CODE was here
```

---

<div class="post-metadata">

**Author:** ![SouravGoswami](https://www.ruby-forum.com/user_avatar/www.ruby-forum.com/souravgoswami/32/2543_2.png) [@SouravGoswami](https://www.ruby-forum.com/u/SouravGoswami)\
**Post date:** [December 31, 2020, 4:43pm UTC](https://www.ruby-forum.com/t/newbie-question-about-local-gems-vs-system-installed-ruby/260729/2 "2020-12-31T16:43:49Z")

</div>

This warning says the library you are using already reinitialize constant. You can’t do much about it. No matter if you use local gem or not. But yes, if you downgrade or upgrade the gem, the warning may go away.

To suppress warnings in IRB, launch the IRB as:

```auto
$ irb -W0

```

Or:

```auto
$ RUBYOPT=-W0 irb

```

* * *

Or you can type this in the IRB:

```auto
irb(main):001:0> $-v = nil

```

Yes, `$-v = nil` or alternatively `$VERBOSE = nil`.

But to make the change persistent, you can add options to IRB by utilizing the .irbrc file:

```auto
# ~/.irbrc

$-v = nil

```

* * *

These are the ways you can disable warnings. Sometimes warnings can be really helpful. But you can’t do anything without either disabling the warning, or let it be fixed by the gem developer or by fixing the gem yourself!

* * *

Currently my situation is kind of similar. When I run irb, I get:

```auto
/usr/lib/ruby/gems/2.7.0/gems/reline-0.2.0/lib/reline.rb:365: warning: instance variable @ambiguous_width not initialized

```

But I safely ignore this warning!
