diff --git a/Gemfile b/Gemfile index f81869344cb..99c0e92f845 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,10 @@ 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" if RUBY_ENGINE == "jruby" + if RUBY_ENGINE == "jruby" + gem "http_parser.rb", "~> 0.6.0" + gem "jruby-openssl" + end end # diff --git a/History.markdown b/History.markdown index 94a5303da02..74e5f9c1ac6 100644 --- a/History.markdown +++ b/History.markdown @@ -1,3 +1,9 @@ +## HEAD + +### Bug Fixes + + * Lock `http_parser.rb` gem to `v0.6.x` on JRuby. + ## 4.2.1 / 2021-09-27 ### Bug Fixes diff --git a/lib/jekyll/commands/new.rb b/lib/jekyll/commands/new.rb index 4623ddafba4..150b4aa7360 100644 --- a/lib/jekyll/commands/new.rb +++ b/lib/jekyll/commands/new.rb @@ -99,6 +99,9 @@ def gemfile_contents # Performance-booster for watching directories on Windows gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] + # 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