mitchellh / vagrant-aws

Use Vagrant to manage your EC2 and VPC instances.
MIT License
2.61k stars 574 forks source link

Gemspec in Gemfile results in duplicate gem definition #496

Closed dandunckelman closed 4 years ago

dandunckelman commented 7 years ago

Following the README to get setup, when I run bundle, I get this:

$ bundle                                                       
Your Gemfile lists the gem vagrant-aws (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of one of them later.

[!] There was an error parsing `Gemfile`: You cannot specify the same gem twice coming from different sources.
You specified that vagrant-aws (>= 0) should come from source at `.` and source at `.`
. Bundler cannot continue.

 #  from /home/dunk/work/personal/vagrant-aws/Gemfile:13
 #  -------------------------------------------
 #  group :plugins do
 >    gem "vagrant-aws" , path: "."
 #  end
 #  -------------------------------------------

It works fine after removing gemspec from the Gemfile.

Should that line be in the Gemfile?

dandunckelman commented 7 years ago

Naturally, when I do that, it doesn't load the dependencies from the gemspec, i.e. rake.

I'm trying to see what I can do to fix this.

dandunckelman commented 7 years ago

Per http://bundler.io/v1.1/gemfile_man.html#GEMSPEC-gemspec-

it adds a gem requirement on your project (:path => '.')

So, it seems to be fixed by removing this from the Gemfile:

group :plugins do
  gem "vagrant-aws" , path: "."
end
dandunckelman commented 4 years ago

So old, don't care.