problems getting ultraviolet syntax highlighting working
Posted by jacqui maher on December 24, 2007 at 06:17 PM
I thought some syntax highlighting on the code I post in this blog would be nice. So, when I found the SimpleHighlight plugin for Simplelog I was happy - now I wouldn’t even have to write any CSS for it:)
It’s not that simple, apparently.
I thought I’d post this in the hopes that someone recognizes the error. I’ve googled and poked around in the code and as far as I can tell it’s due to an incompatibility between the gems (namely textpow) and the oniguruma gem/c library.
For what it’s worth, I ended up following along with these instructions in my attempt to get it all working; I still get the same error.
Rails trace (the top few lines at least):
1 Textpow::ParsingError (Parsing error in ^to \w+: wrong number of arguments (2 for 0)): 2 /usr/lib/ruby/gems/1.8/gems/textpow-0.10.0/lib/textpow/syntax.rb:92:in `initialize' 3 /usr/lib/ruby/gems/1.8/gems/textpow-0.10.0/lib/textpow/syntax.rb:86:in `initialize' 4 /usr/lib/ruby/gems/1.8/gems/textpow-0.10.0/lib/textpow/syntax.rb:75:in `load' 5 /usr/lib/ruby/gems/1.8/gems/ultraviolet-0.10.1/lib/uv.rb:23:in `init_syntaxes' 6 /usr/lib/ruby/gems/1.8/gems/ultraviolet-0.10.1/lib/uv.rb:22:in `init_syntaxes' 7 /usr/lib/ruby/gems/1.8/gems/ultraviolet-0.10.1/lib/uv.rb:67:in `parse' 8 /vendor/plugins/simple_highlight/lib/simple_highlight.rb:40:in `create_clean_content' 9 /vendor/plugins/simple_highlight/lib/simple_highlight.rb:22:in `create_clean_content' 10 /app/models/post.rb:247:in `before_validation_on_create' 11 /app/models/post.rb:267:in `before_validation_on_update'
irb after reinstalling everything again:
1 irb(main):011:0> puts Uv.parse( input, "xhtml", "html", true, "slush_poppies") 2 /usr/lib/ruby/gems/1.8/gems/textpow-0.10.0/lib/textpow/syntax.rb:92:in `initialize': Parsing error in ^to \w+: wrong number of arguments (2 for 0) (Textpow::ParsingError) 3 from /usr/lib/ruby/gems/1.8/gems/textpow-0.10.0/lib/textpow/syntax.rb:86:in `initialize' 4 from /usr/lib/ruby/gems/1.8/gems/textpow-0.10.0/lib/textpow/syntax.rb:75:in `load' 5 from /usr/lib/ruby/gems/1.8/gems/ultraviolet-0.10.1/lib/uv.rb:23:in `init_syntaxes' 6 from /usr/lib/ruby/gems/1.8/gems/ultraviolet-0.10.1/lib/uv.rb:22:in `init_syntaxes' 7 from /usr/lib/ruby/gems/1.8/gems/ultraviolet-0.10.1/lib/uv.rb:67:in `parse'
Comments
There are 15 comments on this post. Post yours →
I can do that, but whats wrong when we tall about music. Many mans in the world not eat every day.
Thanks for good post!
Your site is great and I really appreciate it!
I have always enjoyed reading your blog.
Your site has very much liked me.
I shall necessarily tell about him to the friends.
Excellent site, man and I really appreciate it!
Your site has very much liked me. I really appreciate it!
Hello! Excellent site. Thanks for job!
Hi! Nice post, man. I have always enjoyed reading your site. Thanks you!
Your site is great and I really appreciate it! I have always enjoyed reading your site.
Hello! Excellent site. Thanks for job!
Thanks for job!
Your site has very much liked me. I really appreciate it!
Your site has very much liked me. I really appreciate it!
Your site has very much liked me. I really appreciate it!
Your site is great and I really appreciate it! I have always enjoyed reading your site.
Post a comment
Required fields in bold.