34

What is the difference between using add_dependency and add_runtime_dependency in a Rails engine's gemspec?

For example:

Gem::Specification.new do |s|
  s.add_dependency 'jquery-rails'
  s.add_runtime_dependency 'jquery-rails'
end

What's the difference between them?

Jacob
  • 6,317
  • 10
  • 40
  • 58

1 Answers1

43

They are the same. add_dependency is just an alias for add_runtime_dependency.

O-I
  • 1,535
  • 1
  • 13
  • 13