shedd / duckpan-vagrant

Vagrant + Chef virtual development environment for DuckDuckGo (http://duckduckhack.com)
Apache License 2.0
5 stars 5 forks source link

install vagrant-berkshelf hitting gem dependency errors #27

Closed mnp closed 9 years ago

mnp commented 9 years ago

Ubuntu 14.04.1 LTS, following the readme, stuck at step 5.

$ vagrant plugin install vagrant-berkshelf --plugin-version=2.0.1
Installing the 'vagrant-berkshelf --version '2.0.1'' plugin. This can take a few minutes...
/usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:153:in `gather_dependencies': Unable to resolve dependencies: vagrant-berkshelf requires celluloid (~> 0.16.0.pre), celluloid-io (~> 0.16.0.pre); berkshelf requires addressable (~> 2.3.4), berkshelf-api-client (~> 1.2), buff-config (~> 1.0), buff-extensions (~> 1.0), buff-shell_out (~> 0.1), cleanroom (~> 1.0), faraday (~> 0.9.0), minitar (~> 0.5.4), retryable (~> 1.3.3), ridley (~> 4.0), solve (~> 1.1), thor (~> 0.19), octokit (~> 3.0), celluloid (~> 0.16.0), celluloid-io (~> 0.16.1) (Gem::DependencyError)
    from /usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:267:in `install'
    from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:65:in `block in call'
    from /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
    from /usr/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
    from /usr/share/vagrant/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
    from /usr/share/vagrant/plugins/commands/plugin/action/install_gem.rb:52:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/share/vagrant/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:34:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:116:in `call'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:69:in `block in run'
    from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in `busy'
    from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:69:in `run'
    from /usr/share/vagrant/plugins/commands/plugin/command/base.rb:17:in `action'
    from /usr/share/vagrant/plugins/commands/plugin/command/install.rb:27:in `execute'
    from /usr/share/vagrant/plugins/commands/plugin/command/root.rb:56:in `execute'
    from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:38:in `execute'
    from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:484:in `cli'
    from /usr/bin/vagrant:127:in `<main>'
shedd commented 9 years ago

Hey @mnp what version of Ruby are you running this on?

mnp commented 9 years ago

Duh, sorry, should have listed versions.

Linux onyx 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

libruby1.9.1    1.9.3.484-2ubuntu1.2
ruby    1:1.9.3.4
ruby-childprocess   0.3.9-2
ruby-dev    1:1.9.3.4
ruby-erubis 2.7.0-2
ruby-ffi    1.9.3debian-1ubuntu2
ruby-i18n   0.6.9-1
ruby-log4r  1.1.10-3
ruby-net-http-persistent    2.9-1
ruby-net-scp    1.1.1-1
ruby-net-ssh    1:2.6.8-1
ruby-thor   0.18.1.git20140116-2
ruby1.9.1   1.9.3.484-2ubuntu1.2
ruby1.9.1-dev   1.9.3.484-2ubuntu1.2
rubygems-integration    1.5
vagrant 1.4.3-1
mikedep333 commented 9 years ago
  1. I will look into this. Maybe vagrant-berkshelf needs to be upgraded to a newer version because of a change in a dependency. I was told by the vagrant-berkshelf devs to upgrade to 2.0.1, and to explicitly specify 2.0.1, back in May.
  2. I noticed you are using Vagrant 1.4.3. I will find out if that is OK or not. I am using 1.6.5.
  3. Yesterday this issue was reported. It happens during runtime, rather than during install. Maybe it is related.
mikedep333 commented 9 years ago

Hi @mnp , what version of bundler do you have installed?

I am thinking that the version from Ubuntu 14.04's repos (1.3.5) is too old. I have 1.6.2 installed; although 1.7 is out and it is a security release, so I will update.

If you do have Ubuntu's version installed, could you try the following ? sudo apt-get purge bundler gem install bundler cd duckpan-vagrant bundle install vagrant plugin install vagrant-berkshelf --plugin-version=2.0.1

mikedep333 commented 9 years ago

Also, I updated all the dependencies to the latest versions (including berkshelf 3.2.1). I was then able to uninstall and reinstall vagrant-berkshelf 2.0.1 successfully.

Log and dependency versions

mnp commented 9 years ago

Okay, I tried removing the apt one and using the gem one (above needs sudo btw). I also tried blowing away my ~/.gem and ~/.vagrant.d. Also tried removing ruby and purging /var/lib/gems. No change.

Next I tried learning how to argue with gem about dependencies, and manually satisfying them. The only question I have here is how does the ~> operator work with versions that end in ".pre", ie celluloid in the error.

Here is the current list of gems,


activesupport (3.2.15)
addressable (2.3.6, 2.3.5)
akami (1.2.0)
berkshelf (3.2.1)
berkshelf-api-client (1.2.0)
buff-config (1.0.1, 0.4.0)
buff-extensions (1.0.0, 0.5.0, 0.3.0)
buff-ignore (1.1.1, 1.1.0)
buff-ruby_engine (0.1.0)
buff-shell_out (0.2.0, 0.1.1)
builder (3.2.2)
bundler (1.7.9)
celluloid (0.16.0, 0.14.1)
celluloid-io (0.16.1, 0.14.1)
chozo (0.6.1)
cleanroom (1.0.0)
dep-selector-libgecode (1.0.2)
dep_selector (1.0.3)
erubis (2.7.0)
faraday (0.9.0, 0.8.8)
ffi (1.9.6, 1.9.3)
gssapi (1.0.3)
gyoku (1.1.0)
hashie (2.1.2, 2.0.5)
hitimes (1.2.2)
httpclient (2.3.4.1)
httpi (0.9.7)
i18n (0.6.5)
json (1.8.1)
little-plugger (1.1.3)
logging (1.8.1)
mini_portile (0.5.2)
minitar (0.5.4)
mixlib-authentication (1.3.0)
mixlib-log (1.6.0)
multi_json (1.8.2)
multipart-post (2.0.0, 1.2.0)
net-http-persistent (2.9.4, 2.9)
net-ssh (2.7.0)
nio4r (1.0.1, 0.5.0)
nokogiri (1.6.0)
nori (1.1.5)
octokit (3.7.0, 3.0.0)
rack (1.5.2)
rbzip2 (0.2.0)
retryable (1.3.6, 1.3.3)
ridley (4.1.1, 4.0.0, 1.5.3)
rubyntlm (0.1.1)
savon (0.9.5)
sawyer (0.6.0, 0.5.5)
semverse (1.2.1)
solve (1.2.1, 1.1.0, 0.8.1)
thor (0.19.1, 0.18.1)
timers (4.0.1, 1.1.0)
uuidtools (2.1.4)
varia_model (0.4.0, 0.3.2, 0.2.0)
wasabi (1.0.0)
winrm (1.1.3)

and here's the current error in case it is rotating its shields:

mnp@onyx:~/prj/duckpan-vagrant$ vagrant plugin install vagrant-berkshelf --plugin-version=2.0.1
Installing the 'vagrant-berkshelf --version '2.0.1'' plugin. This can take a few minutes...
/usr/lib/ruby/1.9.1/rubygems/dependency_installer.rb:153:in `gather_dependencies': Unable to resolve dependencies: vagrant-berkshelf requires celluloid (~> 0.16.0.pre), celluloid-io (~> 0.16.0.pre); berkshelf requires addressable (~> 2.3.4), berkshelf-api-client (~> 1.2), buff-config (~> 1.0), buff-extensions (~> 1.0), buff-shell_out (~> 0.1), cleanroom (~> 1.0), faraday (~> 0.9.0), minitar (~> 0.5.4), retryable (~> 1.3.3), ridley (~> 4.0), solve (~> 1.1), thor (~> 0.19), octokit (~> 3.0), celluloid (~> 0.16.0), celluloid-io (~> 0.16.1) (Gem::DependencyError)
... etc

How does one tell specifically which dep it's failing on? As you can see, I have most of those provided for exactly or at least last-digit-approximately.

mikedep333 commented 9 years ago

Hi @mnp you closed this issue. You are still affected, right?

mnp commented 9 years ago

Oops

mikedep333 commented 9 years ago

OK, I am looking into whether vagrant is using some sort of standard gem command to install dependencies, and whether we can call that command in a different way that shows what the dependency problem is.

mikedep333 commented 9 years ago

I figured out that vagrant plugin install (typically) ignores the system gems and installs gems to ~/.vagrant.d/gems/ . It seems to set both GEM_HOME and GEM_PATH to that path. In conclusion, I am getting closer to a fix.

mikedep333 commented 9 years ago

The Fix for #28 6b67391203f29d2e82f387b67114db71015ef0cc will fix this too.

shedd commented 9 years ago

fix pending merge: https://github.com/shedd/duckpan-vagrant/pull/32