I am building and installing a local gem. Also with verbose gem install just sits there and waits for a long long time. No output.
When there is output it finishes in seconds.
One would expect install of local gem to go quickly but evidently it is doing something, maybe on the network, although the gem is local, which takes forever.
Any ideas on how this can fixed?
Almost seems like running 'gem install' adds it to the global available gems (and hence terminal can run the package's commands), whereas adding it to the gemfile and running bundle install only adds it to the application. Similar to npm install --global. that's basically it.
What does gem install do? gem install , in its simplest form, does something kind of like this. It grabs the gem and puts its files into a special directory on your system. You can see where gem install will install your gems if you run gem environment (look for the INSTALLATION DIRECTORY: line):
The Gem command is included with Ruby 1.9+ now, and is a standard addition to Ruby pre-1.9.
To install a gem, use gem install [gem] . Browsing installed gems is done with gem list . For more information about the gem command, see below or head to RubyGems' docs. There are other sources of libraries though.
I can do that but I think I already found the problem.
I have to set/unset proxy settings often and it seems that the rubygems keeps using the proxy server even when I am not using it for example on home network.
unset http_proxy
fixes the problem as a consequence. I didn't expect network would be used as the gem is local and all dependencies are satisfied. As it turns out Rubygems tries to use the network. There is no error message btw. No timeout error or anything. The gem installs without error messages. It just takes a very long time and gives no clue that anything is wrong.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With