diff --git a/Gemfile b/Gemfile index 18ea2da8f85..5b3c6bb3d52 100644 --- a/Gemfile +++ b/Gemfile @@ -37,7 +37,12 @@ group :test do gem "test-theme-skinny", :path => File.expand_path("test/fixtures/test-theme-skinny", __dir__) gem "test-theme-symlink", :path => File.expand_path("test/fixtures/test-theme-symlink", __dir__) - gem "jruby-openssl", "0.10.1" if RUBY_ENGINE == "jruby" + # http_parser.rb has stopped shipping jruby-compatible versions + # latest compatible one was 0.6.0 https://rubygems.org/gems/http_parser.rb + if RUBY_ENGINE == "jruby" + gem "http_parser.rb", "~> 0.6.0" + gem "jruby-openssl" + end end # diff --git a/lib/jekyll/commands/new.rb b/lib/jekyll/commands/new.rb index 3d47e10d7a4..95cba686a6f 100644 --- a/lib/jekyll/commands/new.rb +++ b/lib/jekyll/commands/new.rb @@ -101,6 +101,9 @@ def gemfile_contents # kramdown v1, comment out this line. gem "kramdown-parser-gfm" +# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem +# do not have a Java counterpart. +gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] RUBY end