# Problem with unpacked gems and Kernel#gem

**URL:** <https://www.ruby-forum.com/t/problem-with-unpacked-gems-and-kernel-gem/150062>\
**Category:** Rails\
**Created:** [October 3, 2008, 1:30am UTC](https://www.ruby-forum.com/t/problem-with-unpacked-gems-and-kernel-gem/150062 "2008-10-03T01:30:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 3, 2008, 1:30am UTC](https://www.ruby-forum.com/t/problem-with-unpacked-gems-and-kernel-gem/150062/1 "2008-10-03T01:30:01Z")

</div>

Hi all,

I have searched and searched for this, to no avail. Maybe someone  
here can give me a hand.

In my environment.rb, I added “config.gem” lines for a few gems that  
my app requires. Then, I went ahead and called “rake gems:unpack” and  
tried to deploy my app.

Problem is, if Kernel#gem is called to activate one of the gems I  
unpacked, it fails. I know that you aren’t supposed to need to call  
Kernel#gem after using config.gem, but third party libraries use  
Kernel#gem all the time.

Needless to say this is a problem for me, because my app pretty much  
fails to start.

For now, I’ve worked around this by patching the libraries that call  
Kernel#gem, but for obvious reasons this isn’t an optimal solution.

Any ideas? Any help would be SUPER appreciated. Hope this makes  
sense.

Thanks,  
Taylor

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 4, 2008, 1:49pm UTC](https://www.ruby-forum.com/t/problem-with-unpacked-gems-and-kernel-gem/150062/2 "2008-10-04T13:49:25Z")

</div>

Final message from me on this. It appears some other folks have  
noticed this and are working on it as we speak. Turns out I was on  
the wrong list! (Should’ve been on rails-core - apologies, I am new to  
digging into the details of rails).

In case someone else is looking for similar answers, see:  
[http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1128](http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1128)

Thanks for listening.  
Taylor
