Skip to Content
Learning Puppet 4
book

Learning Puppet 4

by Jo Rhett
April 2016
Intermediate to advanced
594 pages
12h 53m
English
O'Reilly Media, Inc.
Content preview from Learning Puppet 4

Appendix C. Installing Ruby

In this appendix, we will cover how to install Ruby on your personal system. To install the exact same version of Ruby utilized by Puppet, run the following command on one of the test hosts:

[vagrant@client ~]$ /opt/puppetlabs/puppet/bin/ruby --version
ruby 2.1.8p440 (2015-12-16 revision 53160) [x86_64-linux]

As of the last update of this book, Puppet uses Ruby 2.1.8.

Ruby for Mac

Macintosh systems come with a modern version of Ruby installed. You can utilize the system Ruby successfully for every purpose in this book. The only thing necessary is to install the Bundler gem:

$ sudo gem install bundler --no-ri --no-rdoc
Fetching: bundler-1.11.2.gem (100%)
Successfully installed bundler-1.11.2
1 gem installed

If you’d prefer to install the exact version of Ruby that Puppet uses, install HomeBrew and then use the following commands:

$ brew install rbenv ruby-build
...
$ eval "$(rbenv init -)"
$ rbenv install 2.1.8
...
$ rbenv shell 2.1.8

Any time you wish to utilize this version of Ruby, just run these commands again:

$ eval "$(rbenv init -)"
$ rbenv shell 2.1.8

Ruby for Windows

Install the latest Ruby 2.1 (or whatever version Puppet uses today) from RubyInstaller for Windows. You should also install the 64-bit DevKit for Ruby.

After these are installed, use the gem command to install Bundler:

C:\> gem install bundler --no-ri --no-rdoc
Fetching: bundler-1.11.2.gem (100%)
Successfully installed bundler-1.11.2
1 gem installed

Ruby for Linux ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Mastering Puppet 5

Mastering Puppet 5

Ryan Russell-Yates, Jason Southgate
Pro Puppet, Second Edition

Pro Puppet, Second Edition

Spencer Krum, William Van Hevelingen, Ben Kero, James Turnbull, Jeffery McCune
Puppet 6 Essentials

Puppet 6 Essentials

Andrew Mallett

Publisher Resources

ISBN: 9781491907993Purchase bookErrata Page