62
16
I installed Ruby and RubyGems on Ubuntu 10.04. Ruby is version 1.8.7. Gems is version 1.3.7. When I try sudo gem install rails, nothing happens. It just hangs forever. What am I missing? Thanks!
62
16
I installed Ruby and RubyGems on Ubuntu 10.04. Ruby is version 1.8.7. Gems is version 1.3.7. When I try sudo gem install rails, nothing happens. It just hangs forever. What am I missing? Thanks!
57
It'll take quite some time to install rails - there are lot of dependencies and these need to be downloaded - if you have a slow connection, just wait for a bit.
170
Try adding -V (upper case) to the end of the install command, if forces the command to be verbose, so you can see things going on. Eg:
sudo gem install rails -V
Wow. At least they could have echoed something, well anything, to the console. I just assumed that I had to run as root or something similar. – Magnilex – 2015-03-24T19:16:19.217
-V
was very helpful. I had a conflict for the rails binary, where it asked to overwrite y/n
(expecting an action). But without -V
it wouldn't even display that message and it just hangs as a result of this. – Peter Ilfrich – 2015-04-08T02:28:50.623
1Another thing to consider... open Task Manager (or equivalent - I'm using Xubuntu) and view process by CPU usage. That's the only indication I had that gem was actually doing anything until it eventually finished. – nathanchere – 2011-08-04T05:57:41.550
3It was using so little CPU that I still didn't think it was doing anything. I tried -v
but that didn't work - had to be uppercase! – cwd – 2013-02-11T15:37:52.310
1seriously thank you, thought my gems was broken – Jessie Frazelle – 2013-08-06T21:39:58.940
That's what I am looking for! – Frank Fang – 2014-03-30T04:36:12.300
2
if it still very slow or pending somewhere, it normally indicates a low internet connection to the rubygems.org site(showing in the output window). you can try to update the source of the gem using, by
gem source -r https://rubygems.org/
gem source -a "your new source site"
in my country, after I switch to http://ruby.taobao.org, it only takes 1min to complete the installation.
First option is better than just waiting for an empty line to show something – Ali Almoullim – 2015-04-12T19:45:35.043
0
In addition to monitoring with the -V
flag, it's also worth checking that you can pull anything from the internet first. If you're not sure (new server, for example), try wget -O/dev/null https://rubygems.org/
and see if there is trouble retrieving the source site.
I have a lightning fast connection on a VPS server and this is still happening – boulder_ruby – 2015-09-24T19:43:00.287
11Thanks! I guess I was expecting an immediate response of some kind like with apt-get. – bsamek – 2010-09-18T23:48:25.420
I was on the same boat as you - thought it had given up but it was processing in the background. – Sathyajith Bhat – 2010-09-18T23:54:35.270