# Install a separate set of gems

**URL:** <https://www.ruby-forum.com/t/install-a-separate-set-of-gems/182787>\
**Category:** Rails\
**Created:** [February 2, 2010, 8:11pm UTC](https://www.ruby-forum.com/t/install-a-separate-set-of-gems/182787 "2010-02-02T20:11:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![yijisoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/6de8d8/32.png) [@yijisoo](https://www.ruby-forum.com/u/yijisoo)\
**Post date:** [February 2, 2010, 8:11pm UTC](https://www.ruby-forum.com/t/install-a-separate-set-of-gems/182787/1 "2010-02-02T20:11:28Z")

</div>

I run a small RoR application on a company server. I try to install  
my own list of gems because I would like to test new features, but the  
admin did not want to install these because these may disrupt other  
applications. Since I know that I can install some gems locally in my  
own machine, I ask the admin if it is possible to have a separate set  
of gems only for my application or for my user account. However, he  
said “no.” Is it really impossible to do that?

---

<div class="post-metadata">

**Author:** ![yijisoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/6de8d8/32.png) [@yijisoo](https://www.ruby-forum.com/u/yijisoo)\
**Post date:** [February 2, 2010, 8:32pm UTC](https://www.ruby-forum.com/t/install-a-separate-set-of-gems/182787/2 "2010-02-02T20:32:21Z")

</div>

Jiggy Jiggy wrote:

> I run a small RoR application on a company server. I try to install  
> my own list of gems because I would like to test new features, but the  
> admin did not want to install these because these may disrupt other  
> applications. Since I know that I can install some gems locally in my  
> own machine, I ask the admin if it is possible to have a separate set  
> of gems only for my application or for my user account. However, he  
> said “no.” Is it really impossible to do that?

No. Your admin does not know what he is talking about: gem will install  
in ~/.gem if it can’t get write access to the system gem path.

However, for Rails apps, there’s a better way: rake gems:unpack will put  
gems into your app’s vendor/gems directory.

Best,  
–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![yijisoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/6de8d8/32.png) [@yijisoo](https://www.ruby-forum.com/u/yijisoo)\
**Post date:** [February 2, 2010, 8:39pm UTC](https://www.ruby-forum.com/t/install-a-separate-set-of-gems/182787/3 "2010-02-02T20:39:03Z")

</div>

Marnen Laibow-Koser wrote:

> Jiggy Jiggy wrote:
> 
> > I run a small RoR application on a company server. I try to install  
> > my own list of gems because I would like to test new features, but the  
> > admin did not want to install these because these may disrupt other  
> > applications. Since I know that I can install some gems locally in my  
> > own machine, I ask the admin if it is possible to have a separate set  
> > of gems only for my application or for my user account. However, he  
> > said “no.” Is it really impossible to do that?
> 
> No. Your admin does not know what he is talking about: gem will install  
> in ~/.gem if it can’t get write access to the system gem path.
> 
> However, for Rails apps, there’s a better way: rake gems:unpack will put  
> gems into your app’s vendor/gems directory.

Sweet. I think that this is a better approach.

> Best,  
> –Â  
> Marnen Laibow-Koser  
> [http://www.marnen.org](http://www.marnen.org)  
> removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![yijisoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/6de8d8/32.png) [@yijisoo](https://www.ruby-forum.com/u/yijisoo)\
**Post date:** [February 2, 2010, 8:57pm UTC](https://www.ruby-forum.com/t/install-a-separate-set-of-gems/182787/4 "2010-02-02T20:57:09Z")

</div>

On Tue, Feb 2, 2010 at 2:08 PM, jiggy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I run a small RoR application on a company server. I try to install  
> my own list of gems because I would like to test new features, but the  
> admin did not want to install these because these may disrupt other  
> applications. Since I know that I can install some gems locally in my  
> own machine, I ask the admin if it is possible to have a separate set  
> of gems only for my application or for my user account. However, he  
> said “no.” Is it really impossible to do that?

Hi, you can use the Bundler gem to package your gems with your Rails  
application. Thus, you can find information about the gem here:

> **[GitHub - rubygems/bundler: Manage your Ruby application's gem dependencies](https://github.com/rubygems/bundler)**
>
> Manage your Ruby application's gem dependencies. Contribute to rubygems/bundler development by creating an account on GitHub.

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![yijisoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/6de8d8/32.png) [@yijisoo](https://www.ruby-forum.com/u/yijisoo)\
**Post date:** [February 3, 2010, 12:52pm UTC](https://www.ruby-forum.com/t/install-a-separate-set-of-gems/182787/5 "2010-02-03T12:52:44Z")

</div>

Conrad T. wrote:

> On Tue, Feb 2, 2010 at 2:08 PM, jiggy [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I run a small RoR application on a company server. I try to install  
> > my own list of gems because I would like to test new features, but the  
> > admin did not want to install these because these may disrupt other  
> > applications. Since I know that I can install some gems locally in my  
> > own machine, I ask the admin if it is possible to have a separate set  
> > of gems only for my application or for my user account. However, he  
> > said “no.” Is it really impossible to do that?
> 
> Hi, you can use the Bundler gem to package your gems with your Rails  
> application. Thus, you can find information about the gem here:
> 
> [GitHub - rubygems/bundler: Manage your Ruby application's gem dependencies](http://github.com/carlhuda/bundler)
> 
> Good luck,
> 
> -Conrad

Brilliant thread - this is really useful info for he future!

On a similar note to the OP’s original comment about a local copy…I  
was struggling yesterday. I knew i’d installed cucumber but from the  
command line it wouldn’t run. After some digging i worked out i’d done  
‘gem install’ rather than ‘sudo gem install’ and it had ended up in my  
user directory. So the admin is wrong but it does sound like the bundler  
is the right solution 🙂
