# Upgrading gems with native dependencies

**URL:** <https://www.ruby-forum.com/t/upgrading-gems-with-native-dependencies/192626>\
**Category:** Ruby\
**Created:** [August 3, 2010, 9:43am UTC](https://www.ruby-forum.com/t/upgrading-gems-with-native-dependencies/192626 "2010-08-03T09:43:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luckydeepak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/958977/32.png) [@luckydeepak](https://www.ruby-forum.com/u/luckydeepak)\
**Post date:** [August 3, 2010, 9:43am UTC](https://www.ruby-forum.com/t/upgrading-gems-with-native-dependencies/192626/1 "2010-08-03T09:43:17Z")

</div>

hi,

I have installed a gem with a native dependency.  
eg. have installed the yajl library from: [GitHub - lloyd/yajl: A fast streaming JSON parsing library in C.](http://github.com/lloyd/yajl)  
and then have installed yajl-ruby gem:  
[GitHub - brianmario/yajl-ruby: A streaming JSON parsing and encoding library for Ruby (C bindings to yajl)](http://github.com/brianmario/yajl-ruby)

If i upgrade the native package, then do i have to reinstall the gem?  
Also even before doing that, can i find the gems that depend on the  
package. This is because i may not know the gems offhand that depend on  
the native package.

cheers,  
deepak

---

<div class="post-metadata">

**Author:** ![luckydeepak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/958977/32.png) [@luckydeepak](https://www.ruby-forum.com/u/luckydeepak)\
**Post date:** [August 11, 2010, 7:30am UTC](https://www.ruby-forum.com/t/upgrading-gems-with-native-dependencies/192626/2 "2010-08-11T07:30:33Z")

</div>

Any help?  
Can i check the reverse dependency of a native code ie. all the gems  
that depend on the native lib (maybe a c library)

regards,  
deepak

---

<div class="post-metadata">

**Author:** ![luckydeepak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/958977/32.png) [@luckydeepak](https://www.ruby-forum.com/u/luckydeepak)\
**Post date:** [August 11, 2010, 1:38pm UTC](https://www.ruby-forum.com/t/upgrading-gems-with-native-dependencies/192626/3 "2010-08-11T13:38:28Z")

</div>

> If i upgrade the native package, then do i have to reinstall the gem?

Does it remove the old, previous version of the package?  
using ldd -l on the .so file can tell you if you removed a dependency  
file.

> Also even before doing that, can i find the gems that depend on the  
> package. This is because i may not know the gems offhand that depend on  
> the native package.

Currently gems don’t list what packages they depend on. They should  
though, really.  
There is also a gem “pristine” command that might help you.  
-r
