speeding up "gem1.9 install" during development

  • Thread starter R.. Kumar 1.9.1 OSX
  • Start date
R

R.. Kumar 1.9.1 OSX

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" ?
 
L

Luis Lavena

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?

"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.
 
R

R.. Kumar 1.9.1 OSX

Luis said:
"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.
 
L

Luis Lavena

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"

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

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

Brian Candler

R.. Kumar 1.9.1 OSX said:
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
 
R

R.. Kumar 1.9.1 OSX

Brian said:
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.
 
R

R.. Kumar 1.9.1 OSX

R.. Kumar 1.9.1 OSX said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,830
Latest member
HeleneMull

Latest Threads

Top