Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

Gem::Specification#add_development_dependency

add_development_dependency(gem, *requirements)

Adds a development dependency named gem with requirements to this gem.

Usage:

Example
spec.add_development_dependency 'example', '~> 1.1', '>= 1.1.4'

Development dependencies aren’t installed by default and aren’t activated when a gem is required.