hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.27k stars 4.43k forks source link

vagrant serverspec plugin fails to install #11143

Closed einyx closed 3 years ago

einyx commented 5 years ago

Vagrant version

Vagrant 2.2.6

Host operating system

OSX Catalina

Guest operating system

Ubuntu 18.04

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  vagrant_root = File.dirname(__FILE__)
  config.ssh.insert_key = false
  config.vm.box = "dummy.box"
  config.vm.provision :shell, path: "scripts/base/ansible.sh"
  config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: ".git/"
  config.vm.provision "shell", inline: "yum install -y kernel-devel"
  ENV['ANSIBLE_ROLES_PATH'] = "#{vagrant_root}/ansible/roles"

  # VirtualBox.
  config.vm.provider :virtualbox do |v|
    v.memory = 1024
    v.cpus = 3
    v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    v.customize ["modifyvm", :id, "--ioapic", "on"]
  end

  config.vm.provider :aws do |aws, override|
    aws.keypair_name = ""
    aws.region = "eu-west-2"
    aws.instance_type = "m3.medium"
    aws.subnet_id = ""
    aws.ami = ""
    override.ssh.username = "ec2-user"
    override.ssh.private_key_path = ""
  end

  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "ansible/playbooks/whitelister-ec2.yml"
    ansible.extra_vars = "vars/group_vars/all/common"

  end

end

Debug output

➜ packer git:(master) ✗ vagrant plugin install vagrant-serverspec Installing the 'vagrant-serverspec' plugin. This can take a few minutes... Vagrant failed to properly resolve required dependencies. These errors can commonly be caused by misconfigured plugin installations or transient network issues. The reported error is:

activesupport requires Ruby version >= 2.5.0. ➜ packer git:(master) ✗ vagrant plugin install vagrant-serverspec ➜ packer git:(master) ✗ ruby -v ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19] ➜ packer git:(master) ✗ /opt/vagrant/embedded/bin/ruby --version ruby 2.4.9p362 (2019-10-02 revision 67824) [x86_64-darwin13]

Expected behavior

Install vagrant serverspec plugin

Actual behavior

Embedded ruby version seems outdated

Steps to reproduce

  1. Install vagrant
  2. Try to install the vagrant-serverspec plugin
briancain commented 5 years ago

Hi @einyx - Yes, we will have to upgrade the version of Ruby in a future version of Vagrant. For now, the vagrant-severspec plugin should make sure the gems used are compatible with the embedded version of Ruby, otherwise you won't be able to install their plugin with the packaged version of Vagrant.

soapy1 commented 3 years ago

Hi there,

It looks like this has been resolved within a previously shipped version of Vagrant so I am now closing this issue. If the original issue was not fully resolved, please reopen this issue or create a new one.

Cheers!

ghost commented 3 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.