Could not find rails (> 0) in the repository

Posted: October 24th, 2006 | Author: Joakim Andersson | Filed under: popular, rails | 23 Comments »

If you get this when trying to install rails with rubygem you apparently need to remove your source cache.

Not totally obvious.

Update: As you can see from the comments re-running the command should solve it for most.


23 Comments on “Could not find rails (> 0) in the repository”

  1. 1 Anonymous said at 5:52 on February 28th, 2007:

    I ran into this error as well. after much trial and error I discovered that not using root (sudo) to unpack the original ruby and gems files caused the error. suspect that not using sudo means that certain objects are not extracted or are not extracted with the required permissions.

  2. 2 eduludi said at 20:06 on February 28th, 2007:

    Ok, I remove the source_cache, but “Could not find rails (> 0) in the repository” still there.

  3. 3 Joakim said at 9:22 on March 1st, 2007:

    Hmm, that helped me but I had the problem quite a while ago maybe there is a new problem giving the same error.

    I googled a bit and found this thread on the Riding Rails blog that discusses this problem.

    Maybe you should try the suggestions giving in that thread, like:

    First delete the source cache. Then gem update—system. Then gem install rails -y. That should clean things up.
  4. 4 Senthil said at 6:26 on March 30th, 2007:

    I had the same issue. I just re-ran the command and it worked fine. I learnt this while installing RoR on Cygwin.

  5. 5 Gert said at 13:05 on April 16th, 2007:

    Re-running the command did it for me aswell ( Debian Sarge).

  6. 6 Joakim said at 13:22 on April 16th, 2007:

    I wonder why that didn’t help for me. But anyway, good that it worked for you two!

  7. 7 ueckerman.net » Blog Archive » Rails Install minus Installers said at 2:18 on April 18th, 2007:

    [...] told me this was the most common solution, but the last comment was the winner. Run gem install rails -y the second time and you’re [...]

  8. 8 Sideshow said at 23:44 on April 21st, 2007:

    Worked for me to on Tiger 10.4, re running the command.You should not need to unpack using sudo or delete the source cache.

  9. 9 Jay said at 22:48 on May 15th, 2007:

    I had the same problem, using gems 0.9.3, but when I backed out to 0.9.2, it worked first time.

  10. 10 Ann E. Mouse said at 13:59 on June 23rd, 2007:

    Fedora 7, same problem for any gem.

    did gem update –system and removed source_cache and after three more tries – it worked!

  11. 11 tyrantt23 said at 4:01 on July 18th, 2007:

    This has been said before, but I will say it again, re-running the command also solved the problem for me. (Fedora Core 6)

  12. 12 Philippe Rathe said at 4:02 on July 27th, 2007:

    I did it and it works.

    I did everything as root. I uninstall my multiple ruby, rubygem, installation I downgrade to autoconf 2.60 I recompile ruby I install gem I install “gem install rubygems-update” I install “gem update –system”

    and it works

  13. 13 Bruno said at 16:40 on August 3rd, 2007:

    FYI: I had the same issue and indeed; re-run the command worked.

  14. 14 Gregory said at 7:10 on August 21st, 2007:

    Yea, re-running it seems to work.. strange, but simple, anyone experiencing this problem should just re-run it until it works. Thanks people!

  15. 15 Bish said at 22:26 on September 26th, 2007:

    Re-running the command for OS X 10.4 worked for me as well. Hmm. Go figure.

  16. 16 Jamal said at 1:43 on October 27th, 2007:

    Did not work, I tried about 10 times.

    I keep getting the same error after deleting source_cache and running gem update –system.

  17. 17 Brian said at 19:48 on November 14th, 2007:

    Jamal, run gem update –system twice without deleting the source_cache after the first run.

    so the order would be delete sourc_cache run gem update –system run gem update –system

  18. 18 James W said at 8:37 on November 15th, 2007:

    on Mac OSX 10.4 PPC building from source a la hivelogic with Ruby 1.8.6 and Gem 0.9.4

    > sudo gem install rails –include-dependencies –failed

    > sudo rm -r /PATH/TO/GEM/1.8/source_cache > sudo gem install rails –include-dependencies –failed > sudo gem install rails –include-dependencies WORKED, albeit REALLY slowly….

    seemingly it was the re-run that made it work for me and not the clearing of source_cache.

  19. 19 tasso said at 14:38 on November 18th, 2007:

    James, many thanks for this – re-running it worked for me too on Mac OSX 10.4 intel

  20. 20 Chris said at 23:02 on December 8th, 2007:

    Thanks, this worked for me, but, I had to close and open a new shell. Can’t imagine why that would matter! Thanks again!

  21. 21 Will said at 13:04 on December 17th, 2007:

    I deleted the caches and did the gem update, then ran gem install rails –include-dependencies and got a 404 error. Tried it again, and it worked! Thanks!

  22. 22 Anthony Burns said at 7:05 on July 23rd, 2008:

    sudo rm -f /PATH/TO/GEM/1.8/source_cache sudo gem update sudo gem update

    Confirmation this works on Ubuntu Hardy Heron when I was having this problem! Thanks!

  23. 23 Lemisfit.org» Blogarchiv » Ruby on Rails und der Gibbon [update] said at 21:29 on September 9th, 2008:

    [...] rails (> 0) in the repository”, den Befehl einfach nochmal ausführen. Hilft das nicht, dann hier die Comments [...]


Leave a Reply