The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #14712

Hiera parsing fails when using ruby 1.9.x

Added by Sergio Galvan almost 4 years ago. Updated about 3 years ago.

Status:Merged - Pending ReleaseStart date:05/27/2012
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Keywords: Affected Hiera Version:0.3.0

We've Moved!

Ticket tracking is now hosted in JIRA:


An example base on the work environment (production,stage) works fine when using ruby 1.8.7, on the other hand using 1.9.X reports some issues. I’m using rvm to manage ruby versions. When I used 1.9.2-p318, 1.9.3-p125, and 1.9.3-p194 the next error crops up:

$ hiera  -c hiera.yaml db env=stage
$ Failed to start Hiera: Psych::SyntaxError: (hiera.yaml): couldn't parse YAML at line 2 column 6

My hiera.yaml looks like:

- %{env}
- common
- yaml
:datadir: '/etc/puppet/hieradata'

When removing %{env} (line 2) it always returns nil

$ hiera  -c hiera.yaml  db
WARN: 2012-05-27 21:05:01 +0000: Failed to load noop logger: LoadError: cannot load such file -- hiera/noop_logger

It’s pretty strange that the same example works fine using ruby 1.8.7-head. My apologies if this is not a bug and is something regarding rvm.



#1 Updated by Kelsey Hightower almost 4 years ago

  • Status changed from Unreviewed to Merged - Pending Release

Ruby 1.9.x support was added in the upcoming Hiera 1.0.0 release, which is currently in RC.

#2 Updated by Patrick Hemmer about 3 years ago

Ran across this issue myself after upgrading to ruby 1.9.3. The solution was to put quotes around the values. It’s apparently the percent sign which is causing the yaml parser in 1.9.3 to croak.

Also available in: Atom PDF