racc and mini_portile2 are needed only to build native extension. --- a/nokogiri.gemspec +++ b/nokogiri.gemspec @@ -339,9 +339,9 @@ spec.requirements << "jar xerces, xercesImpl, 2.12.2" # https://search.maven.org/artifact/xerces/xercesImpl spec.requirements << "jar xml-apis, xml-apis, 1.4.01" # https://search.maven.org/artifact/xml-apis/xml-apis else - spec.add_runtime_dependency("mini_portile2", "~> 2.8.2") # keep version in sync with extconf.rb + spec.add_development_dependency("mini_portile2", "~> 2.8.2") # keep version in sync with extconf.rb end - spec.add_runtime_dependency("racc", "~> 1.4") + spec.add_development_dependency("racc", "~> 1.4") spec.extensions << "ext/nokogiri/extconf.rb" end