4

I use octopress for my technical blog. I updated my octopress codes from official octopress repo, and I get an error like that when I run rake generate:

 |1.9.3-p194| home in ~/Documents/work/git/muratcorlu.github.com
± |source ✓| → rake generate
## Generating Site with Jekyll
directory source/stylesheets/ 
   create source/stylesheets/screen.css 
Configuration from /Users/muratcorlu/Documents/work/git/muratcorlu.github.com/_config.yml
/Users/muratcorlu/Documents/work/git/muratcorlu.github.com/plugins/category_generator.rb:109: warning: regexp has invalid interval
/Users/muratcorlu/Documents/work/git/muratcorlu.github.com/plugins/category_generator.rb:109: warning: regexp has `}' without escape
/Users/muratcorlu/Documents/work/git/muratcorlu.github.com/plugins/category_generator.rb:146: warning: regexp has invalid interval
/Users/muratcorlu/Documents/work/git/muratcorlu.github.com/plugins/category_generator.rb:146: warning: regexp has `}' without escape
/Library/Ruby/Gems/1.8/gems/jekyll-0.11.2/bin/../lib/jekyll/site.rb:76:in `require': /Users/muratcorlu/Documents/work/git/muratcorlu.github.com/plugins/image_tag.rb:27: undefined (?...) sequence: /(?<class>\S.*\s+)?(?<src>(?:https?:\/\/|\/|\S+\/)\S+)(?:\s+(?<width>\d+))?(?:\s+(?<height>\d+))?(?<title>\s+.+)?/ (SyntaxError)
/Users/muratcorlu/Documents/work/git/muratcorlu.github.com/plugins/image_tag.rb:29: undefined (?...) sequence: /(?:"|')(?<title>[^"']+)?(?:"|')\s+(?:"|')(?<alt>[^"']+)?(?:"|')/
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.11.2/bin/../lib/jekyll/site.rb:76:in `setup'
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.11.2/bin/../lib/jekyll/site.rb:75:in `each'
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.11.2/bin/../lib/jekyll/site.rb:75:in `setup'
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.11.2/bin/../lib/jekyll/site.rb:30:in `initialize'
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.11.2/bin/jekyll:224:in `new'
    from /Library/Ruby/Gems/1.8/gems/jekyll-0.11.2/bin/jekyll:224
    from /usr/bin/jekyll:23:in `load'
    from /usr/bin/jekyll:23

What is the problem?

Murat Çorlu
  • 8,207
  • 5
  • 53
  • 78
  • did you compare with this line? (missing 'i') https://github.com/imathis/octopress/blob/master/plugins/image_tag.rb#L27 – gokmen Nov 19 '12 at 21:39
  • Yes, they are exactly same. My code is at github also: https://github.com/muratcorlu/muratcorlu.github.com/blob/source/plugins/image_tag.rb#L27 – Murat Çorlu Nov 20 '12 at 09:41
  • So what happens when you revert the merge from the Octopress of tip? Basically I'm asking, did this error occur before the merge? or, were you writing a new post and the error started? I ask because I've encountered several errors with tip, and usually revert - waiting for a bug report or to merge again a month later. – eduncan911 Aug 03 '14 at 18:05

1 Answers1

1

First I tried the RegEx in irb:

$ irb
irb(main):001:0> /(?:"|')(?<title>[^"']+)?(?:"|')\s+(?:"|')(?<alt>[^"']+)?(?:"|')/
=> /(?:"|')(?<title>[^"']+)?(?:"|')\s+(?:"|')(?<alt>[^"']+)?(?:"|')/
irb(main):002:0> 

I got no error, but then I found out that my default ruby version on the server was 1.8.7.

I chose ruby-1.9.3-p551 from rvm and made it active.

I did the following:

rvm use ruby-1.9.3-p551
bundle install
bundle exec rake generate

This resolved the error for me.

tuxdna
  • 8,257
  • 4
  • 43
  • 61