# Dependencies in the gemspec

**URL:** <https://www.ruby-forum.com/t/dependencies-in-the-gemspec/240887>\
**Category:** Rails\
**Created:** [May 5, 2014, 9:27am UTC](https://www.ruby-forum.com/t/dependencies-in-the-gemspec/240887 "2014-05-05T09:27:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [May 5, 2014, 9:27am UTC](https://www.ruby-forum.com/t/dependencies-in-the-gemspec/240887/1 "2014-05-05T09:27:39Z")

</div>

There are runtime dependencies, development dependencies, and unlabeled  
dependencies (“add\_dependency”).

What exactly are the differences among these dependencies? When do you  
make a dependency a runtime dependency only? When do you make it a  
development dependency only? And does “add\_dependency” make it a  
runtime  
and development dependency?

---

<div class="post-metadata">

**Author:** ![Jason\_H.S\_Rubyist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/2bfe46/32.png) [@Jason\_H.S\_Rubyist](https://www.ruby-forum.com/u/Jason_H.S_Rubyist)\
**Post date:** [May 5, 2014, 9:49am UTC](https://www.ruby-forum.com/t/dependencies-in-the-gemspec/240887/2 "2014-05-05T09:49:48Z")

</div>

Runtime dependencies are the gems required by your gem during its  
runtime,  
ie, the gems without which your gem can’t work. Development dependencies  
are those which are required only while developing the gem (example:  
rspec,  
pry ) . When you do gem install or when bundler installs your  
gem  
for you, only the runtime dependencies will be installed and not the  
development dependencies.

Also , add\_dependency = add\_runtime\_dependency .
