views:

3857

answers:

4

I'm following these instructions to set up Ruby on Rails on my Ubuntu machine. For now at least, I'm planning to use Mongrel.

When I get to this step:

sudo gem install rails

...I get this message:

Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR: could not find rails locally or in a repository

What should I do next?

+2  A: 

I would try to update gems first. The latest version is 1.3.3. You can do this on Ubuntu by either:

sudo gem install rubygems-update
sudo update_rubygems

or

sudo gem install rubygems-update
cd /var/lib/gems/1.8/gems/rubygems-update-*
sudo ruby setup.rb
Jason Punyon
On running the first command, I get:Bulk updating Gem source index for: http://gems.rubyforge.org/ERROR: could not find rubygems-update locally or in a repository
Nathan Long
I think you're definitely having a network problem then. I got very similar behavior when I was setting up an ubuntu box at work a couple of weeks ago...
Jason Punyon
Is there a port blocked or something? How can I troubleshoot it?
Nathan Long
Updating gems worked for me.
andyuk
+1  A: 

gem install rails --source http://gems.rubyonrails.org

phillc
This is the only one that worked for me.
Jamie
+3  A: 

basically, try again! It could be a serious error, but in earlier versions ( I encountered this about 1 year ago or so ) it happend on the first try and when trying again the gem would eventually be found. I think it had something to do with the servers performance or such.

Using a recent version of rubygems is probably a good idea, and if it really won't work you can always get the .gem file from sourceforge directly and install from it.

For example with the file rails-2.3.2.gem:

gem install rails-2.3.2 –local
Paul
Just wanted to second this point about it being inconsistent. I believe "rails" is a special sort of compound gem. For some reason installing the separate parts, such as activerecord, activesupport, and so forth, never fails for me, but in the past (not so much now with the latest RubyGems 1.3.1 and up) "rails" was very temperamental and it'd usually take a few tries.
Peter Cooper
The instructions for installing locally seem to get me further, but then it tells me that my version of rake isn't new enough, and trying to update it gets me the same "could not find" message.
Nathan Long
I suppose I could go find all this stuff manually, but I'm trying to use package management for everything, and so far it's not working.
Nathan Long