Comments (9)
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.
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.
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.
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.
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.
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.
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.
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.
You get my vote for staying with the System Ruby! 👍
from puppet-r10k.
Related Issues (20)
- Remove dependence on old puppetlabs-git module
- Remove dependency on puppetlabs/ruby module HOT 1
- Support Bitbucket webhook pull request event type
- CLI arguments --no-ri and --no-rdoc have been deprecated since Ruby 2.6.0
- webhook pulling wrong version of git repo HOT 1
- Enhancement Request: Support ignore_branch_prefixes in config hash / seperate HOT 1
- updates on existing unit file fail to restart service due to missing systemctl daemon-reload HOT 2
- Docs wrong for mcollective "deploy" command?
- Webhook incorrectly reports success on `ping` event from GitHub with invalid secret
- Webhook-go url is hardcoded HOT 1
- Please clarify the instructions for integrating abrader-gms webhook type into this module HOT 4
- Request for comment on refactoring HOT 3
- wrong dependencies for version 12.1.0 and 12.0.0? HOT 2
- Webhook in v11 non functional, v12 incompatible
- Webhook go ordering manages service prior installing package
- webhook configuration default location - `/etc/voxpupuli` does not exist
- Documentation is totally wrong for webhook-go
- Installing r10k Returns Error: Last Version of faraday (~> 2.0) to support your Ruby & RubyGems was 3.0.2 then 2.8.1 HOT 1
- New release? HOT 1
- Provide ability to override individual webhook settings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-r10k.