Git Product home page Git Product logo

Comments (9)

acidprime avatar acidprime commented on June 18, 2024

Interesting catch, I might just remove the conditional for here:
https://github.com/acidprime/r10k/blob/master/manifests/install/gem.pp#L13 to fix.

from puppet-r10k.

rnelson0 avatar rnelson0 commented on June 18, 2024

There's another way to fix this:

[root@puppet ~]# puppet apply r10k_installation.pp
Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: Compiled catalog for puppet.mss.local in environment production in 1.39 seconds
Notice: /Stage[main]/Main/Ini_setting[manifestdir]/ensure: created
Notice: /Stage[main]/R10k::Config/File[r10k.yaml]/ensure: defined content as '{md5}002f0a108d30fd845821242369b99a85'
Notice: /Stage[main]/R10k::Config/Ini_setting[R10k Modulepath]/ensure: created
Notice: /Stage[main]/R10k::Install/Package[r10k]/ensure: created
Notice: /Stage[main]/Ruby/Package[rubygems-update]/ensure: created
Notice: /Stage[main]/Ruby/Exec[ruby::update_rubygems]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Ruby::Dev/Package[ruby-devel]/ensure: created
Notice: Finished catalog run in 74.40 seconds
[root@puppet ~]# yum reinstall rubygems -y

This gives back the original version of 'gem' from the rubygems package and there's no need to re-install r10k.

from puppet-r10k.

dhgwilliam avatar dhgwilliam commented on June 18, 2024

I ran into this issue this weekend and @rnelson0's fix above is exactly what I ended up doing.

exec { 're-install rubygems':
  path    => '/usr/bin',
  command => 'yum -y reinstall rubygems',
  unless  => 'puppet --version',
  require => Exec['ruby::update_rubygems'],
}

Although I should add that in my environment, the rubygems-update package actually completely breaks all tools installed via gem, including puppet and r10k

from puppet-r10k.

rnelson0 avatar rnelson0 commented on June 18, 2024

It technically doesn't break them, as they're still available once you
reinstall rubygems, so that's a positive.

On Wednesday, April 23, 2014, David Gwilliam [email protected]
wrote:

I ran into this issue this weekend and @rnelson0https://github.com/rnelson0's
fix above is exactly what I ended up doing.

exec { 're-install rubygems':
path => '/usr/bin',
command => 'yum -y reinstall rubygems',
unless => 'puppet --version',
require => Exec['ruby::update_rubygems'],
}

Although I should add that in my environment, the rubygems-update package
actually completely breaks all tools installed via gem, including puppetand
r10k


Reply to this email directly or view it on GitHubhttps://github.com/acidprime/r10k/issues/37#issuecomment-41197574
.

Rob Nelson
[email protected]

from puppet-r10k.

pall-valmundsson avatar pall-valmundsson commented on June 18, 2024

I just ran into this as well on RHEL 6.5. IMO it shouldn't update gem. The issue from my point of view is that the update of gem from version 1.3.7 to 2.2.2 changes the default gem directory from /usr/lib/ruby/gems/1.8 to /usr/lib64/ruby/gems/1.8 which effectively makes all previously installed gems "disappear". Re-installing the gem package isn't really a solution.

I can throw together a patch that handles this for ::osfamily="RedHat" or if there is general consensus that updating gem is bad the r10k::install::gem class can be simplified a lot.

Any thoughts?

from puppet-r10k.

tfhartmann avatar tfhartmann commented on June 18, 2024

I'd be interested in seeing a patch! Is there any down side for not upgrading the gem from 1.3.7 -> 2.2.2 ?

from puppet-r10k.

pall-valmundsson avatar pall-valmundsson commented on June 18, 2024

I'm not sure, not really a Ruby expert. But I think that when integral components are provided with a distro package you shouldn't upgrade it out of path since a lot of other packages on the system might, and should, depend on them.

from puppet-r10k.

rnelson0 avatar rnelson0 commented on June 18, 2024

The negative I saw is that not only were the gems lost, but the RPM
database was affected. rpm showed the 1.x rubygems but it was overwritten
with 2.2, which I'm sure eventually would have broken a dependency chain
down the road. If it really must use 2.2, then it should get the list of
installed gems, uninstall the gems and rpm, then install the new rubygems
(apparently from source as there's no 2.2 in either CentOS or Puppet repos)
and install all the gems previously installed. I can't imagine that could
be supported with any reasonable sense of robustness, so staying at the
system level of rubygems makes far more sense.

Rob Nelson
[email protected]

On Wed, May 21, 2014 at 12:09 PM, Pall Valmundsson <[email protected]

wrote:

I'm not sure, not really a Ruby expert. But I think that when integral
components are provided with a distro package you shouldn't upgrade it out
of path since a lot of other packages on the system might, and should,
depend on them.


Reply to this email directly or view it on GitHubhttps://github.com/acidprime/r10k/issues/37#issuecomment-43777834
.

from puppet-r10k.

tfhartmann avatar tfhartmann commented on June 18, 2024

You get my vote for staying with the System Ruby! 👍

from puppet-r10k.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.