Make gistub work with JRuby
pellegrino opened this issue · 4 comments
Hello! First of all, thanks for putting together this great project.
I was trying to deploy gistub using JRuby, but it wasn't possible, due Redcarpet using native C libraries.
I have a branch where I'm using a pure ruby implementation instead - Kramdown. Would you be interested in this patch? In this branch, both JRuby and Ruby 2.0.0 are also supported.
Thank you for your pull request. Basically I'm not a JRuby user. So I didn't check for JRuby when adding markdown support. Sorry for that.
I've tried your patch and found that Kramdown fails to parse markdown in some cases. Tentatively I added begin-rescue but there might be a better fix.
gistub/app/helpers/application_helper.rb
Lines 43 to 47 in bb2e165
Thanks!
found that Kramdown fails to parse markdown in some cases.
In detail, the following error occurrs on JRuby.
Java::JavaLang::ArrayIndexOutOfBoundsException in Gists#show
On CRuby, everything seems to be fine.
Thanks for merging in so fast!
I was investigating the bug and it seems to be related to this thread: http://jira.codehaus.org/browse/JRUBY-6613
I've tested the given scenario and everything worked fine on Jruby 1.7.3.
Anyway, thank you for the great support to the project!
Thank you for your investigation! Indeed my JRuby environment is too old (1.6.x).