17

I'm using Jekyll to convert my markdown and Pygments for syntax highlighting.

Here is the error maruku displays:

Liquid error: undefined method `join' for "\n song_info = []\n for song in songs:\n song_info.append(song.name) \n":String

The markup is as follows:

{% highlight python %}
    song_info = []
    for song in songs:
        song_info.append(song.name)                                                                                                                                   
{% endhighlight %}

Testing Pygments in iPython produces no errors.

Any ideas? ;o(

Thanks in advance!

Attila O.
  • 15,659
  • 11
  • 54
  • 84
muffs
  • 805
  • 10
  • 14

3 Answers3

21

I had the same problem and reverted the liquid gem to version 2.2.2 as a workaround. Seems like a bug in the 2.3.0 version's pygments support, or Jekyll's use of it.

sudo gem uninstall liquid
sudo gem install liquid --version '2.2.2'
olov
  • 391
  • 3
  • 4
  • note current jekyll 0.11.2 (as of this writing) requires liquid 2.3 minimum so you'll likely need to go back to earlier jekyll (eg 0.11.0) to use this workaround – Partly Cloudy Jul 26 '12 at 12:24
2

On a side note, GitHub recommends using RedCarpet.

To use it, configure Jekyll by adding markdown: redcarpet to ./_config.yml. Then, install RedCarpet with [sudo] gem install redcarpet on your development machine so you can compile your Jekyll site.

ma11hew28
  • 121,420
  • 116
  • 450
  • 651
  • 1
    Arrgh, I can't get anything to work fully as it is intended that is Ruby-based (Guessing that it's because I'm relying on the official Ubuntu repos to provide me with stuff)... Tried both to revert Liquid to v2.2.2 and tell jekyll to use RedCarpet (Which it seems like it is not doing)... – Frank Nov 07 '11 at 12:09
  • Using RedCarpet or any other markdown flavor has nothing to do with the Liquid error he's getting. – Mike Caron Jan 25 '12 at 18:01
1

Simply replace liquid-2.3.0 gem files with latest version from Github.

It works with jekyll-0.11.2 + liquid-2.3.0 + Pygments

jhonkola
  • 3,385
  • 1
  • 17
  • 32
Jarod Denison
  • 21
  • 1
  • 1