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

Gem install error on Ubuntu 12.04 when specifying the version #55

Closed
sedan07 opened this issue Jun 23, 2014 · 8 comments
Closed

Gem install error on Ubuntu 12.04 when specifying the version #55

sedan07 opened this issue Jun 23, 2014 · 8 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@sedan07
Copy link

sedan07 commented Jun 23, 2014

Ubuntu 12.04
Puppet: 3.6.2
Ruby: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
Gem: 2.3.0

Receiving the following gem error when running puppet apply on a basic manifest to install r10k:

returned 1: ERROR:  Can't use --version w/ multiple gems. Use name:ver instead

The manifest looks as follows:

class { 'r10k':
  version           => '1.2.1',
  sources           => {
    'puppet' => {
      'remote'  => 'https://github.com/glarizza/puppet_repository.git',
      'basedir' => "\${::settings::confdir}/environments",
      'prefix'  => false,
    }
  },
  purgedirs         => ["\${::settings::confdir}/environments"],
  manage_modulepath => true,
  modulepath        => "\${::settings::confdir}/environments/\$environment/modules:/opt/puppet/share/puppet/module$
}

Full eror output below:

Notice: /Stage[main]/R10k::Config/File[r10k.yaml]/content: content changed '{md5}9d7efc05dd744e3bb103d5d5a9dd16d4' to '{md5}f2cf801c542cd4ee0d7ea51e62bb2862'
Error: Could not update: Execution of '/usr/bin/gem install -v 1.2.1 --no-rdoc --no-ri r10k ' returned 1: ERROR:  Can't use --version w/ multiple gems. Use name:ver instead.
Wrapped exception:
Execution of '/usr/bin/gem install -v 1.2.1 --no-rdoc --no-ri r10k ' returned 1: ERROR:  Can't use --version w/ multiple gems. Use name:ver instead.
Error: /Stage[main]/R10k::Install/Package[r10k]/ensure: change from absent to 1.2.1 failed: Could not update: Execution of '/usr/bin/gem install -v 1.2.1 --no-rdoc --no-ri r10k ' returned 1: ERROR:  Can't use --version w/ multiple gems. Use name:ver instead.
@gioppoluca
Copy link

Same in CentOS 6.5 but the error is
could not finc valid gem ''
if I do a gem install r10k it works perfectly.
Thanks

@sedan07
Copy link
Author

sedan07 commented Jun 26, 2014

To get around the could not find valid gem '' error set the install_options param to something other than --no-rdoc --no-ri, for instance when testing '--debug' seems to fix it.

class { 'r10k':
  version           => 'present', # Changed to get round version issue
  sources           => {
    ...
  },
  ...
  install_options   => '--debug', # to fix finding '' gem
}

This doesn't solve the issue it is just a temp work around.

@gioppoluca
Copy link

Sorry for the dumb question.
When you write:
version => 'present', # Changed to get round version issue
you mean
version => '1.2.1', # Changed to get round version issue
or we need to write "present"

@acidprime
Copy link
Collaborator

This sounds like a bug in the puppet gem provider

@acidprime
Copy link
Collaborator

@seb-github any update on this, I have one other bug as referenced but I can't reproduce? i.e. the other reference includes the puppet bug that I thought this was as well.

@sedan07
Copy link
Author

sedan07 commented Sep 19, 2014

#74 looks like the same problem to me, was using Puppet v3.6 when getting the error but puppet ticket: #13397 was for 2.7 so that problem shouldn't exist in this version (well hopfully) I will re-try next week and see if I work out which bits messing up. It does look like a problem in the puppet gem provider I agree.

@eshamow
Copy link

eshamow commented Sep 24, 2014

@acidprime fyi I am also seeing this on CentOS 6.5 with POSS 3.7.1. I also found that changing the install options to --debug from --no-ri --no-rdoc worked around the problem. Sounds like a gem provider issue, will start digging through JIRA. :p

@acidprime acidprime added bug Something isn't working duplicate This issue or pull request already exists labels Feb 23, 2015
@acidprime
Copy link
Collaborator

This I believe acidprime@22fd541 should fix this behavior closing for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants