# A gem into plugin folder

**URL:** <https://www.ruby-forum.com/t/a-gem-into-plugin-folder/141731>\
**Category:** Rails\
**Created:** [June 30, 2008, 7:40am UTC](https://www.ruby-forum.com/t/a-gem-into-plugin-folder/141731 "2008-06-30T07:40:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jags](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@jags](https://www.ruby-forum.com/u/jags)\
**Post date:** [June 30, 2008, 7:40am UTC](https://www.ruby-forum.com/t/a-gem-into-plugin-folder/141731/1 "2008-06-30T07:40:25Z")

</div>

hi guys

i am working ona ubuntu hardy heron box.  
just wanted to know is there a command to install(copy) a gem in my  
system  
as a plugin into my rails project

or it has to be done manually by locating gems directory inside my  
ruby installation folder.

also wanted to know whether there would be any issues  
bcos of using a gem as a plugin or is it perctecly ok to do it.

jags

---

<div class="post-metadata">

**Author:** ![jags](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@jags](https://www.ruby-forum.com/u/jags)\
**Post date:** [June 30, 2008, 4:26pm UTC](https://www.ruby-forum.com/t/a-gem-into-plugin-folder/141731/2 "2008-06-30T16:26:17Z")

</div>

Hi Jags,

Jags R. wrote:

> also wanted to know whether there would be any issues  
> bcos of using a gem as a plugin or is it perctecly ok to do it.

I think the answer to your question is probably yes, using a gem as a  
plugin  
would probably cause issues. Gems and Plugins have separate purposes.  
Gems  
extend Ruby. Plugins extend Rails. They’re put in separate places  
because  
Ruby and Rails search for extensions in different places.

Aside from that… what is it you’re trying to accomplish? If you  
already  
have the functionality you’re looking for as a gem, why would you want  
to  
move that to a plugin?

Best regards,  
Bill

---

<div class="post-metadata">

**Author:** ![jags](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@jags](https://www.ruby-forum.com/u/jags)\
**Post date:** [June 30, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/a-gem-into-plugin-folder/141731/3 "2008-06-30T18:35:56Z")

</div>

This link doesn’t tell you had to install a gem as a plugin per se but  
it does tell you how to put your gems into your vendors directory.

> **[Vendor Everything — err.the\_blog](http://errtheblog.com/posts/50-vendor-everything)**
>
> Err the Blog: Ruby and Rails from the front.

---

<div class="post-metadata">

**Author:** ![jags](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@jags](https://www.ruby-forum.com/u/jags)\
**Post date:** [June 30, 2008, 6:37pm UTC](https://www.ruby-forum.com/t/a-gem-into-plugin-folder/141731/4 "2008-06-30T18:37:07Z")

</div>

On 30 Jun 2008, at 16:42, pcg79 wrote:

> This link doesn’t tell you had to install a gem as a plugin per se but  
> it does tell you how to put your gems into your vendors directory.
> 
> [Vendor Everything — err.the\_blog](http://errtheblog.com/posts/50-vendor-everything)

If you’re on rails 2.1 you’ll want to look at the new gem dependency  
stuff, it will do all the gem vendoring stuff for you

Fred

---

<div class="post-metadata">

**Author:** ![jags](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/dc4da7/32.png) [@jags](https://www.ruby-forum.com/u/jags)\
**Post date:** [July 2, 2008, 10:13am UTC](https://www.ruby-forum.com/t/a-gem-into-plugin-folder/141731/5 "2008-07-02T10:13:19Z")

</div>

hello all

first thx for all the replies

hi bill i was actually looking for this when i came across the haml  
plugin.  
initially it was available as plugin and also as gem and i used it as  
plugin  
but now it has to be installed as gem and then we do a command which  
copies a file to the plugin folder(dont know what we call doing this  
technically).

then i learnt that i can copy the gem to vendor/plugins and it wud work  
the same  
so was looking for command

i am on rails 2.1.0 and it seems  
the rake gems:unpack is the command i’m looking for but there seems to  
be some rough edges with gem dependency things in rails 2.1.0. as per  
the comments on this article by ryandaigle

[http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-gem-dependencies](http://ryandaigle.com/articles/2008/4/1/what-s-new-in-edge-rails-gem-dependencies)

so for now i am locating the haml gem in my ruby installation i.e

/usr/lib/ruby/gems/1.8/gems/haml-2.0.1/  
and copying it to my plugins folder

again thanks for responses…
