eco-rb / bundler-ecology

Bundler plugin to black-list unwanted gems
MIT License
8 stars 2 forks source link

Fix warnings on `bundle install` #2

Open v-kolesnikov opened 5 years ago

v-kolesnikov commented 5 years ago
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 2.0.1
Fetching bundler-ecology 0.1.0
Installing bundler-ecology 0.1.0
Installed plugin bundler-ecology
/Users/v.kolesnikov/projects/eco-rb/bundler-ecology/lib/bundler/ecology/version.rb:5: warning: already initialized constant Bundler::Ecology::VERSION
/Users/v.kolesnikov/projects/eco-rb/bundler-ecology/.bundle/plugin/gems/bundler-ecology-0.1.0/lib/bundler/ecology/version.rb:5: warning: previous definition of VERSION was here
olleolleolle commented 4 years ago

This could be a conditional defined?(...)?

@v-kolesnikov Can this also be a Good First Issue?

v-kolesnikov commented 4 years ago

IIRC it happens when I try to add bundler-ecology as a gem to Gemfile and install this Gemfile in environment where bundler-ecology already installed globally.

v-kolesnikov commented 4 years ago

Can this also be a Good First Issue?

Of course!

mjcbsn22 commented 4 years ago

I was unable to replicate this issue. I installed bundler-ecology globally, added it to a new project gemfile, then bundle install in the new project. I did not receive any warnings.

I tried multiple versions of bundler (v1.15.4, v2.0.2) to install the gems in the new project.