# Require gem only for specific controller

**URL:** <https://www.ruby-forum.com/t/require-gem-only-for-specific-controller/182712>\
**Category:** Rails\
**Created:** [February 1, 2010, 8:00pm UTC](https://www.ruby-forum.com/t/require-gem-only-for-specific-controller/182712 "2010-02-01T20:00:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicpon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/4491bb/32.png) [@nicpon](https://www.ruby-forum.com/u/nicpon)\
**Post date:** [February 1, 2010, 8:00pm UTC](https://www.ruby-forum.com/t/require-gem-only-for-specific-controller/182712/1 "2010-02-01T20:00:56Z")

</div>

Hello,  
Is there a way to require a gem only when specific controller is  
accessed. I have one plugng that doesn’t like co-existing with a  
gem(active scaffold and will\_paginate).  
I have two controllers that use will\_paginate, but no active scaffold  
and I thought of requiring that gem only for those two.  
Possible?
