Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix for Ruby 1.9.3-rc1 #116

wants to merge 1 commit into


None yet

The executable was dying on me in Ruby 1.9.3-rc1, looks like an older method in the YAML module was being used. This was causing a undefined method 'each_document' for Psych:Module (NoMethodError)

I didn't find any tests for the executable, but running this at a bash prompt in the root of the project should verify it still works with multiple documents.

cat <<data | ./bin/mustache - ./examples/simple.mustache                                                                         

name: Awesome
value: 200
in_ca: true
taxed_value: 20

name: Awesome2
value: 400
in_ca: false


akaspin commented Apr 28, 2012


voxik commented Sep 20, 2012

I can confirm the issue. Can the patch be applied please? Thank you.

voxik commented Sep 20, 2012

BTW it was reported as an Fedora issue: https://bugzilla.redhat.com/show_bug.cgi?id=859025


Pat's patch is a good start, however it breaks default ruby on many platforms commonly used in production.

I've forked the gem and adapted the patch for compatibility. See also #143.


gem 'mustache', :git => "https://github.com/steakknife/mustache.git"


gem install mustache --source https://gems.gemfury.com/8n1rdTK8pezvcsyVmmgJ/

jtara commented Jul 25, 2013

The Gem available on gems.gemfury.com appears to be the unpatched version. It has the same problem, and I examined the source code. It is the original code with just the call to YAML.each_document

404pnf commented Oct 15, 2013

same problem under ruby 2.0.


+1 ( ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13] )

@locks locks referenced this pull request Feb 18, 2014


1.9.3+ YAML compatibility #143


locks commented Feb 18, 2014

Fixed by #143.

@locks locks closed this Feb 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment