Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RVM Fails due to some certificate #36

Closed
myoung34 opened this issue Apr 28, 2014 · 1 comment
Closed

RVM Fails due to some certificate #36

myoung34 opened this issue Apr 28, 2014 · 1 comment

Comments

@myoung34
Copy link

I have a Vagrantfile that spins up a VM with RVM as:

  config.vm.provision 'shell' do |shell|
    shell.inline = 
      'touch /var/lib/hiera/common.yaml;' + 
      '[ -d /etc/puppet/modules/rvm ] || sudo puppet module install maestrodev/rvm;'
  end

  config.vm.provision :puppet do |puppet|
    puppet.manifests_path = '.vagrant/manifests'
    puppet.manifest_file = 'default.pp'
  end

Where default.pp is:

package { 'libcurl-devel':
  ensure   => installed,
  provider => yum,
}->

class { 'rvm':
}->

rvm::system_user { 
  vagrant: 
  ; 
}->

rvm_system_ruby {
  '2.1.1':
    ensure      => 'present',
    default_use => true;
}

This code has worked until today it seems, where it errors with:

Notice: /Stage[main]/Rvm::Group/Group[rvm]/ensure: created
Notice: /Stage[main]/Rvm::Rvmrc/File[/etc/rvmrc]/ensure: defined content as '{md5}3ec590d219afbf91a7c1a149a15e72cb'
Notice: /Stage[main]//Package[libcurl-devel]/ensure: created
Notice: /Stage[main]//Service[iptables]/ensure: ensure changed 'running' to 'stopped'
Notice: /Stage[main]/Resolv_conf/File[resolv.conf]/content: content changed '{md5}952b66961b92ab3941df7256d4cb6b40' to '{md5}8f357a2e70da9d6391318d162731b4ca'
Notice: /Stage[main]/Rvm::System/Exec[system-rvm]/returns: bash: line 1: syntax error near unexpected token `newline'
Notice: /Stage[main]/Rvm::System/Exec[system-rvm]/returns: bash: line 1: `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'
Error: /usr/bin/curl -sSL https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer |                     bash -s -- --version latest returned 2 instead of one of [0]
Error: /Stage[main]/Rvm::System/Exec[system-rvm]/returns: change from notrun to 0 failed: /usr/bin/curl -sSL https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer |                     bash -s -- --version latest returned 2 instead of one of [0]
Notice: /Stage[main]//Rvm::System_user[vagrant]/Exec[rvm-system-user-vagrant]/returns: executed successfully
Error: Could not find a suitable provider for rvm_system_ruby
Notice: Finished catalog run in 41.78 seconds
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

puppet apply --manifestdir /tmp/vagrant-puppet-1/manifests --detailed-exitcodes /tmp/vagrant-puppet-1/manifests/default.pp || [ $? -eq 2 ]

Stdout from the command:

Notice: /Stage[main]/Rvm::Group/Group[rvm]/ensure: created
Notice: /Stage[main]/Rvm::Rvmrc/File[/etc/rvmrc]/ensure: defined content as '{md5}3ec590d219afbf91a7c1a149a15e72cb'
Notice: /Stage[main]//Package[libcurl-devel]/ensure: created
Notice: /Stage[main]//Service[iptables]/ensure: ensure changed 'running' to 'stopped'
Notice: /Stage[main]/Rvm::System/Exec[system-rvm]/returns: bash: line 1: syntax error near unexpected token `newline'
Notice: /Stage[main]/Rvm::System/Exec[system-rvm]/returns: bash: line 1: `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'
Notice: /Stage[main]//Rvm::System_user[vagrant]/Exec[rvm-system-user-vagrant]/returns: executed successfully
Notice: Finished catalog run in 41.78 seconds

and

Error: /usr/bin/curl -sSL https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer |                     bash -s -- --version latest returned 2 instead of one of [0]
Error: /Stage[main]/Rvm::System/Exec[system-rvm]/returns: change from notrun to 0 failed: /usr/bin/curl -sSL https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer |                     bash -s -- --version latest returned 2 instead of one of [0]
Error: Could not find a suitable provider for rvm_system_ruby

The error seems to be the SSL cert, as going into the box i can get that curl command to work only by adding the insecure flag -k. The teporary fix is to modify my Vagrantfile to look like:

  config.vm.provision 'shell' do |shell|
    shell.inline = 
      'touch /var/lib/hiera/common.yaml;' +
      '[ -d /etc/puppet/modules/rvm ] || sudo puppet module install maestrodev/rvm;' +
      '[ -f /root/.curlrc ] || echo insecure > /root/.curlrc;'
  end
@carlossg
Copy link
Member

see #37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants