Skip to content
Advertisement

Tag: ruby

How to test for existence of a file on the Puppet Master

In a customized modules on Puppet I have and I want to let the module do something whether or not the file “fqdn-of-server” exist on the Puppet Master. Googling did get me a file_exists.rb function: and this does work when put in something like: in my manifest init.pp (of course $fqdn is a facter). The problem is that it works

ruby Array.inspect vs. Array[element].to_s

I’m working with an array, which we’ll call books, of complex objects, which we’ll call Book. The problem is when I call puts “#{books.inspect}”, ruby outputs a stream of binary (unreadable utf8 characters). However, when I call puts #{books[0].to_str}”, I get a brief, pretty output that describes the book in question. Not sure if it is relevant, but Book is

Gem Command not found

I have installed gem on Ubuntu 10.10 32 bit with But when I try to run I get the error of the command not being found. I installed gem, is there any reason it is saying it can’t find the command? These files were install by gem package http://pastie.org/3483416 Answer Are you wanting ruby gems? If so, you need to

Cannot install ruby version on redhat

I have the following problem and whatever I try, nothing helps. I hope someone could help me with this. I have a redhat server and I’m trying to install redmine on it. Redmine needs Ruby >= 1.8.7 to run so I installed it and when I execute ruby -v in the console it says I have version 1.8.7 (so that’s

Advertisement