开发者

Installing Rails ERROR: could not find rails locally or in a repository

开发者 https://www.devze.com 2022-12-14 22:04 出处:网络
I\'ve been poking around the internet looking for a solution on this one... with no luck.. I\'m new to rails... If anyone has an idea, I\'d love to hear it. Much appreciated!

I've been poking around the internet looking for a solution on this one... with no luck.. I'm new to rails... If anyone has an idea, I'd love to hear it. Much appreciated!

I enter:

LW:src liamwright$ sudo gem install rails --include-dependencies

And Get:

INFO:  `gem instal开发者_如何学Gol -y` is now default and will be removed
INFO:  use --ignore-dependencies to install only the gems you list
Bulk updating Gem source index for: http://gems.rubyforge.org
ERROR:  could not find rails locally or in a repository

I am running:

ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
Mac OS X 10.5.8

I also tried:

gem sources -r gems.rubyonrails.org 

And Get:

source gems.rubyonrails.org not present in cache


Just to check...

...try doing a sudo gem update --system before installing Rails to make sure you have the latest RubyGems installed?

EDIT: Actually, if your RubyGems install is really old, you might need to follow the alternate directions on Gemcutter.


Might want to make sure you have the newest rubygems:

sudo gem install rubygems-update
sudo gem update --system

Then:

sudo gem install rails


I came across this solution on Albertux' blox. Running this script will fix it (It worked perfectly for me on an Ubuntu 9.10 machine):

#!/bin/bash
#(download the latest on http://rubyforge.org/frs/?group_id=126)
wget http://rubyforge.org/frs/download.php/43984/rubygems-update-1.3.0.gem
sudo gem install rubygems-update-1.3.0.gem
sudo update_rubygems
# now this work:
sudo gem update --system
echo "done."


I've just had the same problem trying to upgrade rubygems from 1.2.0 to 1.3.7.

Setp-1) So I just downloaded rubygems-update-1.3.7.gem from http://rubyforge.org/frs/?group_id=126

Setp-2) gem install rubygems-update-1.3.7.gem

Setp-3) update_rubygems

and it work for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消