ruby/ruby-lang.org — pull request #28 by stomar (2013-01-27 17:04:12+00:00)
Title: Enable build with current gem versions

This fixes a compatibility problem of some plugins (`blockquote` in particular) with the current version of Liquid that prevents generating the site in an up-to-date working environment.

Using current gem versions I could not generate the site with `thor admin:generate`, neither under Ruby 1.9.2-p320 nor 1.9.3-p374. (Though I previously did remove `Gemfile.lock` to avoid fails due to gem version mismatches.) Using bundler and the (old) gem versions specified in `Gemfile.lock` worked fine.

Error message:

Building site: source -> public
Liquid Exception: undefined method `map' for # in index.markdown
/home/marcus/Programming/Forks/ruby-lang.org/plugins/blockquote.rb:49:in `render'
/home/marcus/.rvm/gems/ruby-1.9.2-p320/gems/liquid-2.4.1/lib/liquid/block.rb:94:in `block in render_all'
...
...
Build Failed

The reason is a change in liquid 2.3.0 that makes the `render_all` method of `Liquid::Block` now always return strings and not arrays, see commit https://github.com/Shopify/liquid/commit/1a4ff9547acd000c124108d1faa6531ef3b25b3f from May 2011.

The Octopress plugins have been updated accordingly, also in May 2011, see https://github.com/imathis/octopress/commit/e53b26ad3042d5657c869ab1961c35e7b716e4e9.

The proposed patch fixes the affected plugins, mirroring the above changes of Octopress. Note that with this patch blockquotes will no longer work properly when the site is built using the current `Gemfile.lock` (using Liquid 2.2.2), so I also included a commit with a new `Gemfile.lock`.

I also changed the preferred Ruby version in `.rvmrc` from 1.9.2 to 1.9.3.

This patch might be a somewhat hackish solution to the problem and it would probably be better to update the entire Octopress part of this site...?!? **But** in my opinion it's already a big win to get the build working again in an up-to-date environment without relying on contributors having to use rvm and outdated gemsets.

Regards,
Marcus