Im developing a Rails engine that includes 3 dependencies:
gemspec
s.add_dependency "rswag-api"
s.add_dependency "rswag-ui"
s.add_dependency "rswag-specs"
My problem is I want the third gem (rswag-specs
) available in my host application under development environment only. Normally, in a Rails app would do this:
Gemfile
group :development, :test do
gem 'rswag-specs'
end
I need to do something similar from my gem instead.
s.add_development_dependency
will not install the gem in group :development
Try this:
s.add_development_dependency 'rswag-specs'
This is directly from the docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With