# Speeding up "gem1.9 install" during development

**URL:** <https://www.ruby-forum.com/t/speeding-up-gem1-9-install-during-development/191090>\
**Category:** Ruby\
**Created:** [July 5, 2010, 7:58am UTC](https://www.ruby-forum.com/t/speeding-up-gem1-9-install-during-development/191090 "2010-07-05T07:58:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [July 5, 2010, 7:58am UTC](https://www.ruby-forum.com/t/speeding-up-gem1-9-install-during-development/191090/1 "2010-07-05T07:58:16Z")

</div>

During development, I keep running rake install. The following command  
often takes a minute to execute, although the gem is created in a  
second.

gem1.9 install …/pkg/xxxx.gem

Running --trace doesn’t help at all since no details come after the  
above line.

Is there any way this can be speeded up. Do others use some other  
alternative?  
Should I be testing and using my app from the development directory  
itself as:

ruby lib/x.rb instead of from the PATH. (Its a CLI program so it  
installs in my path as well).

Does the number of dependencies slow down “gem install” ?

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [July 5, 2010, 3:35pm UTC](https://www.ruby-forum.com/t/speeding-up-gem1-9-install-during-development/191090/2 "2010-07-05T15:35:45Z")

</div>

On Jul 5, 2:58 am, “R… Kumar 1.9.1 OSX” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> alternative?  
> “rake install”, depending on the gem project you’re working on (which  
> you don’t specify) might be running test or any other task prior the  
> gem building and installation.

Check the tasks dependencies of “rake install” using “rake -P” and see  
on which other tasks it depends.

> Should I be testing and using my app from the development directory  
> itself as:
> 
> ruby lib/x.rb instead of from the PATH. (Its a CLI program so it  
> installs in my path as well).

Run your tests, or do with ruby -Ilib bin/xxx

> Does the number of dependencies slow down “gem install” ?

Depending on how “rake install” works, it should be running with gem  
install --local, to avoid hitting the remote source index.

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [July 5, 2010, 3:48pm UTC](https://www.ruby-forum.com/t/speeding-up-gem1-9-install-during-development/191090/3 "2010-07-05T15:48:28Z")

</div>

Luis L. wrote:

> On Jul 5, 2:58ï¿½am, “R… Kumar 1.9.1 OSX” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > alternative?  
> > “rake install”, depending on the gem project you’re working on (which

> Depending on how “rake install” works, it should be running with gem  
> install --local, to avoid hitting the remote source index.

rake install - runs gem1.9 install and that’s where the time goes (when  
I ran --trace)

Thus, my question is to do with speeding up “gem1.9 install” and not  
“rake install”

thx.

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [July 5, 2010, 5:20pm UTC](https://www.ruby-forum.com/t/speeding-up-gem1-9-install-during-development/191090/4 "2010-07-05T17:20:33Z")

</div>

On Jul 5, 10:48 am, “R… Kumar 1.9.1 OSX” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I ran --trace)
> 
> Thus, my question is to do with speeding up “gem1.9 install” and not  
> “rake install”

gem1.9 install --local path/to/my.gem

As I mentioned before, that will not hit the remote source index.

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [July 5, 2010, 5:47pm UTC](https://www.ruby-forum.com/t/speeding-up-gem1-9-install-during-development/191090/5 "2010-07-05T17:47:34Z")

</div>

Brian C. wrote:

> R… Kumar 1.9.1 OSX wrote:
> 
> > During development, I keep running rake install. The following command  
> > often takes a minute to execute, although the gem is created in a  
> > second.
> > 
> > gem1.9 install …/pkg/xxxx.gem
> 
> Try with --no-ri --no-rdoc

gem1.9 install --no-ri --no-rdoc ./pkg/…

putting this in my command, seems to have not much impact.  
I actually have this in my .gemrc file already.

I tried a gem install --local and it was instantaneous.

How can i get “rake install” to do a --local.  
I obviously don’t want this to be global or i wont be able to install  
external gems.

thx.

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [July 5, 2010, 8:01pm UTC](https://www.ruby-forum.com/t/speeding-up-gem1-9-install-during-development/191090/6 "2010-07-05T20:01:10Z")

</div>

R… Kumar 1.9.1 OSX wrote:

> Brian C. wrote:
> 
> > R… Kumar 1.9.1 OSX wrote:
> > 
> > > During development, I keep running rake install. The following command  
> > > often takes a minute to execute, although the gem is created in a  
> > > second.
> > > 
> > > gem1.9 install …/pkg/xxxx.gem
> > 
> > Try with --no-ri --no-rdoc
> 
> gem1.9 install --no-ri --no-rdoc ./pkg/…
> 
> putting this in my command, seems to have not much impact.  
> I actually have this in my .gemrc file already.
> 
> I tried a gem install --local and it was instantaneous.
> 
> How can i get “rake install” to do a --local.  
> I obviously don’t want this to be global or i wont be able to install  
> external gems.

Currently, since my Rakefile is generated by Jeweler, i found that it  
calls gem install. I’ve hardcoded a “–local” in the jeweler Command.  
Don;t know how else I could pass the value from rake. I think it only  
affects rake install and not gem install, so its okay.

---

<div class="post-metadata">

**Author:** ![sentinel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/fbc32d/32.png) [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Post date:** [July 5, 2010, 5:32pm UTC](https://www.ruby-forum.com/t/speeding-up-gem1-9-install-during-development/191090/7 "2010-07-05T17:32:04Z")

</div>

R… Kumar 1.9.1 OSX wrote:

> During development, I keep running rake install. The following command  
> often takes a minute to execute, although the gem is created in a  
> second.
> 
> gem1.9 install …/pkg/xxxx.gem

Try with --no-ri --no-rdoc
