rodjek/librarian-puppet — pull request #167 by carlossg (2014-01-17 10:42:14+00:00)
Title: `require': no such file to load -- open3_backport (LoadError)

Copied from https://github.com/maestrodev/librarian-puppet/issues/16 (was raised for librarian-puppet-maestrodev but looks like it would affect this as well)

Hello,

I have a failure in Travis on Ruby 1.8.7 - the open3_backport gem isn't being installed. This appears to be due to the gemspec conditionally adding this as a dependency, but it's evaluated at build time, not install time, so the dependency isn't added to Ruby < 1.9 installs.

Apparently this is the required approach: http://en.wikibooks.org/wiki/Ruby_Programming/RubyGems#How_to_install_different_versions_of_gems_depending_on_which_version_of_ruby_the_installee_is_using

References:
* Test failure https://travis-ci.org/jfryman/puppet-nginx/jobs/16828741
* Discussion on Stack Overflow: http://stackoverflow.com/questions/4596606/rubygems-how-do-i-add-platform-specific-dependency/10249133#10249133