[英]How can I do syntax highlighting in JRuby?
I'd like to use something like ultraviolet in JRuby. 我想在JRuby中使用诸如紫外线之类的东西。 It (obviously) does not compile, however:
它(显然)不会编译,但是:
$ gem install ultraviolet
Fetching: oniguruma-1.1.0.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing ultraviolet:
ERROR: Failed to build gem native extension.
~/.rvm/rubies/jruby-1.6.7/bin/jruby extconf.rb
WARNING: JRuby does not support native extensions or the `mkmf' library very well.
Check http://kenai.com/projects/jruby/pages/Home for alternatives.
checking for main() in -lonig... yes
creating Makefile
make
cc -I. -I. -I~/.rvm/rubies/jruby-1.6.7/lib/native/include/ruby -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -Wall -arch x86_64 -c oregexp.c
Is there a similar library? 有类似的图书馆吗?
I really like pygments.rb . 我真的很喜欢pygments.rb 。 Pygments itself is written in Python, but the integration has worked well for me.
Pygments本身是用Python编写的,但是集成对我来说效果很好。 It's really fast, and best of all it supports tons of languages.
它确实非常快,并且最重要的是它支持多种语言。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.