# Gem as Plugin

**URL:** <https://www.ruby-forum.com/t/gem-as-plugin/152562>\
**Category:** Rails\
**Created:** [November 5, 2008, 6:11am UTC](https://www.ruby-forum.com/t/gem-as-plugin/152562 "2008-11-05T06:11:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayyanar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Post date:** [November 5, 2008, 6:11am UTC](https://www.ruby-forum.com/t/gem-as-plugin/152562/1 "2008-11-05T06:11:12Z")

</div>

I have installed the fiveruns tuneup gem. I copied the five runs folder  
from the gems directory  
(C:\ruby\lib\ruby\gems\1.8\gems\fiveruns\_tuneup-0.8.17)  
to the application vendor directory. When I restarted the server,  
console shown the following error:

E:/Pavo/Insoshi/vendor/rails/activesupport/lib/active\_support/dependencies.rb:116:in  
`qualified_const_defined?': "Plugins::FiverunsTuneup-0.8.17::Lib::Fiveruns" is not a valid constant name! (NameError) from E:/Pavo/Insoshi/vendor/rails/activesupport/lib/active_support/dependencies.rb:339:in`new\_constants\_in’

Iam not sure what is the problem? Is it because I moved the gems to the  
vendor folder? Generally how can we conver the gem as plugin?

---

<div class="post-metadata">

**Author:** ![ayyanar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Post date:** [November 5, 2008, 3:50pm UTC](https://www.ruby-forum.com/t/gem-as-plugin/152562/2 "2008-11-05T15:50:47Z")

</div>

> Iam not sure what is the problem? Is it because I moved the gems to the  
> vendor folder? Generally how can we conver the gem as plugin?

If you are using the latest Rails 2.1.x then you want to look into gem  
dependencies. Rails 2.1 has support for managing and freezing gem  
dependencies. No need to roll your own solutions anymore.

Start by looking for the config.gem examples in your  
config/environments.rb file.

Example:  
config.gem “aws-s3”, :lib =\> “aws/s3”

Then to “unpack” the configured gem into the vendors folder use:

rake gems:unpack GEM=aws-s3

Also take a look at all the other gems options you have by running:

rake -T gems

Ayyanar Aswathaman wrote:

> Iam not sure what is the problem? Is it because I moved the gems to the  
> vendor folder? Generally how can we conver the gem as plugin?
